aspose file tools
The moose likes Mock Exam Errata and the fly likes Yet another erratum Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Mock Exam Errata
Reply Bookmark "Yet another erratum" Watch "Yet another erratum" New topic
Author

Yet another erratum

Panagiotis Varlagas
Ranch Hand

Joined: Nov 27, 2000
Posts: 233
Hi all.
It seems I am debugging Mughal's mock exam these days...
Here is what I believe to be yet another (the 3rd I've found thus far) erratum:
QUESTION:
Which statements are true concerning the effect of the >> and >>> operators?
The following answer is considered to be correct:
(d) The value returned by >>> will never be negative as long as the value of the right operand is equal to or greater than one.
Here is a counterexample to prove the non-correctness of the answer:
-1 >>> 32
The value of this expression (-1) is negative, even though the value of the right operand is >= 1.
Panagiotis.
bill bozeman
Ranch Hand

Joined: Jun 30, 2000
Posts: 1070
You are correct. This one I believe was talked about before here. But as you show, it can be negative. Question should also state if the value of left mod right does not equal 0.
Bill
 
IntelliJ Java IDE
 
subject: Yet another erratum
 
Threads others viewed
S & B SCJP 6 - C7 - Q4 erratum
K &B Erratum? Regarding generics
Mughal's mock exam erratum
K&B - Erratum ?
Mughal's mock exam erratum
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com