This week's giveaway is in the Spring forum.We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!See this thread for details.
Big Moose Saloon
 Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies Register / Login Win a copy of REST with Spring (video course) this week in the Spring forum!

# A Programmer's Guide to Java� Certification [mock exam] errata?

Michal Harezlak
Ranch Hand

Joined: Jul 06, 2000
Posts: 185
While using "A Programmer's Guide to Java� Certification" mock exam for s while I have realize that no meter how careful I answered all the question I can not get 100%, here are the questions that have surprising answers. Is it just me? Please correct me if I am mistaken.

1.Which are valid identifiers?
class is given as an correct answer.
2.Which statements are true concerning the effect of the >> and >>> operators?
following sentence is presented as true:
the value return by >>> operator will never be negative as long as the value of the right operands is equal or greater that 1.
am I missing something?
regards.
Savithri Devaraj
Ranch Hand

Joined: Jun 26, 2000
Posts: 103
2. (-1>>>32) Right shifting by 32 equivalent to shifting by 0. You have to take the right operand MOD 32 as the actual operand.
Savithri
Michal Harezlak
Ranch Hand

Joined: Jul 06, 2000
Posts: 185
Originally posted by Savithri Devaraj:
2. (-1>>>32) Right shifting by 32 equivalent to shifting by 0. You have to take the right operand MOD 32 as the actual operand.
Savithri

I definitely agree with that, but please read it carefully again and if you still have any doubts check out this example:
<code>
int shift = 32;
System.out.println(-1>>>shift);
System.out.println(shift);
<code>
Savithri Devaraj
Ranch Hand

Joined: Jun 26, 2000
Posts: 103
The question said: As long as the right operand is equal to or greater than 1.
0 is not greater than 1. You can argue 32 is greater than 1, but that is not what the questioner meant I think.
Savithri
Michal Harezlak
Ranch Hand

Joined: Jul 06, 2000
Posts: 185
Originally posted by Savithri Devaraj:
The question said: As long as the right operand is equal to or greater than 1.
0 is not greater than 1. You can argue 32 is greater than 1, but that is not what the questioner meant I think.
Savithri

How do you know what the question meant? There is nothing in it that would indicated that any value of right operand should be excluded.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 13027

5
That just goes to show how hard it is to make up un-ambiguous questions - I ought to know, I've made up hundreds and people are still finding alternate interpretations to what I intended.
It's just a fact of life - my advice is don't over-interpret questions you find on the exam.
Bill
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
Well, I'd argue that this question is completely unambiguous. It's just wrong.
Just think though - if only there were some way that authors could fix their errors and let people know about it. Maybe if they were to, I dunno, put up a web page or something. That would be cool, wouldn't it?
(Something William has in common with Mughal and Rasmussen is that they all are very good about fixing any errors that have been found, in their errata. The least we can do in return is read them...)

"I'm not back." - Bill Harding, Twister
Michal Harezlak
Ranch Hand

Joined: Jul 06, 2000
Posts: 185
Originally posted by Jim Yingst:

Just think though - if only there were some way that authors could fix their errors and let people know about it. Maybe if they were to, I dunno, put up a web page or something. That would be cool, wouldn't it?

i know that might be a bit radical, but what about fixing the software ( there is no cost for redistribution since you can download it from the web.)
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
Ah yes, I forgot that was were you were getting the question from. I just saw the question itself and new that the issue had come up before, so I checked the book errata. You're right, it would be nice if the exam simulator were updated as well.

I agree. Here's the link: http://aspose.com/file-tools

subject: A Programmer's Guide to Java� Certification [mock exam] errata?