File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Associate Certification (SCJA,OCAJ 5/6)
McKenzie's Mock Exam Question 13-3 on pg. 286 has wrong answers.
Joined: Jan 30, 2004
Mar 05, 2010 08:54:39
I believe the answers are wrong for question 13- 3 on page 286 in the McKenzie's Mock Exam Questions book.
The question is:
Given the declarations below, which of the following conditional statements would evaluate to true?
int x1 = 10, x2 = 20, x3 = 30, x4 = 40, x5 = 50; double d = 0; boolean b = true;
! (b == true) && (x1 > d)
(b == true) && (x1 > d)
On page 295, it lists the correct answers as a, b, c - which I believe it should be a, b, d. I'm using
(TM) SE Runtime Environment (build 1.6.0_18-b07).
Answer c cannot evaluate to true because of the exclamation point before the left hand expression. The right hand expression does result in true, but the left hand expression would result in false.
Am I missing something here?
Cameron Wallace McKenzie
author and cow tipper
Joined: Aug 26, 2006
Mar 05, 2010 08:55:33
Indeed. It was an error in the book.
Thanks for the update!
I agree. Here's the link:
subject: McKenzie's Mock Exam Question 13-3 on pg. 286 has wrong answers.
Bates/Sierra SCJP 5.0 MasterExam Error
urgent help on K&B chapter 7 Self Test Questions
Doubt from K&B ch 5
mock question about "case"
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014