Question 39 of Test 4

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
Shuba

Question 39 of Test 4

Post 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]

admin
Site Admin
Posts: 10065
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: Question 39 of Test 4

Post by admin »

Hi,
Which question bank are you using? This prints false in 1.5 and true in 1.6.

HTH,
Paul.
If you like our products and services, please help us by posting your review here.

Guest

Re: Question 39 of Test 4

Post by Guest »

Using 1.6 but answer given is false with a detailed explanation...

admin
Site Admin
Posts: 10065
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: Question 39 of Test 4

Post by admin »

Please read the question again :)
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 249 guests