my dog learned polymorphism*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes A Programmer's Guide to Java� Certification [mock exam] errata? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "A Programmer Watch "A Programmer New topic
Author

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.
what about -1>>>32
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: 12678
    
    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

Java Resources at www.wbrogden.com
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?
 
Similar Threads
what are my chances for the exam
which certfication books should i refer
SCJP Opinions on Books
SCJP exam preparation
mock exams on jcp 1.4