• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

pgjc - mock exam questions (answers incorrect)?

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The following is a question from the pgjc - mock exam that i think has an incorrect answer.

1. Which of statements are true concerning the effect of the >> and >>> operators?
a) for non-negative values of the left operand, the >> and >>> operators will have the same effect.
b) the result of (-1 >> 1) is 0
c) the result of (-1 >>> 1) is -1
d) the value returned by >>> will never be negative as long as the value of the right operand is equal to or greater than 1
e) when using the >> operator, the left most bit of the bit representation of the resulting value will always be the same bit value as the leftmost bit of the bit representation of the left operand.
the mock exam has the answer as A,D,E
i think that the correct answer is A, E
D is incorrect for example (-10 >>> 32) is still -10
 
J. Macha
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The pgjc exam also has the following question.
Which are valid identifiers.
a) class
b) $value$
c) zer@
d) angstrom
e) 2much
it has the answer as being A,B,D
but class is a reserved word so it can not be used as an identifier
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Macha,
The answer d of your first question in my book is
d) The value returned by >>> will never be negative as long as the value of the right operand is not divisible by 32.
So the answer d is correct.
The answer a of your second question in my book is
a) _class
So the answer a is also correct.

Thanks,

Erin
 
J. Macha
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The questions are from the pgjc mock exam application.
I guess they fixed the questions in the book (mine is the same as you said) but they did not correct the exam engine that is on the website.
thanks
 
J. Macha
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The questions are from the pgjc mock exam application.
I guess they fixed the questions in the book (mine is the same as you said) but they did not correct the exam engine that is on the website.
thanks
 
You don't know me, but I've been looking all over the world for. Thanks to the help from this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic