Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Knute Johnson Newsgroups: comp.lang.java.programmer Subject: Re: A small quiz Date: Thu, 10 Aug 2017 10:29:45 -0500 Organization: A noiseless patient Spider Lines: 19 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 10 Aug 2017 15:25:32 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="f634ba0235d090e8cd1a342880fd4210"; logging-data="8605"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18IT/Ja+UIdIzyjiaWg7GgA" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 In-Reply-To: Content-Language: en-US Cancel-Lock: sha1:grJfRPKeIOsBwLefGJBT9M4v1gY= Xref: csiph.com comp.lang.java.programmer:37125 On 8/10/2017 9:36 AM, Eric Sosman wrote: > On 8/10/2017 10:19 AM, Stefan Ram wrote: >> Can you correctly predict the output of this program? > > Yes. > >> public final class Main >> { public static void main( final java.lang.String[] args ) >> { java.lang.System.out.println >> ( Double.valueOf( Double.NaN ).equals >> ( Double.valueOf( Double.NaN ))); }} > > ... but I'm somewhat surprised you wrote `Double' -- four > times! -- instead of `java.lang.Double'. > He is being a little inconsistent isn't he? knute...