Page 1 of 1

Question 39 of Test 4

Posted: Mon Jun 27, 2011 12:41 pm
by Shuba
Hi The question is whether the following is true or false. The answer is false but when I compile and run I get true.

Code: Select all

[code]
float f = 1.0F/3.0F;
System.out.println(  (f * 3.0F) == 1.0F  );
[code]

Re: Question 39 of Test 4

Posted: Mon Jun 27, 2011 9:08 pm
by admin
Hi,
Which question bank are you using? This prints false in 1.5 and true in 1.6.

HTH,
Paul.

Re: Question 39 of Test 4

Posted: Tue Jun 28, 2011 1:33 pm
by Guest
Using 1.6 but answer given is false with a detailed explanation...

Re: Question 39 of Test 4

Posted: Wed Nov 16, 2011 8:26 pm
by admin
Please read the question again :)