• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Don't understand answer in OCA Java SE7 by Mala Gupta

 
Gino Fortunato
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm reviewing for the certification and in the book there are sample exam questions. While most of the answers are explained, this one is eluding me. In section 2.8, Q2-1, answer key suggests that the statement
A value can't be assigned to a primitive variable
is false. But certainly is assigning a value of 100 to primitive variable, isn't it?

TIA
 
Sergej Smoljanov
Ranch Hand
Posts: 468
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Q2-1. Select all incorrect statements:
a A programmer can’t define a new primitive data type.
b A programmer can define a new primitive data type.
c Once assigned, the value of a primitive can’t be modified.
d A value can’t be assigned to a primitive variable.

a A programmer can’t define a new primitive data type. true
b A programmer can define a new primitive data type. false
c Once assigned, the value of a primitive can’t be modified.false
d A value can’t be assigned to a primitive variable. false

but because you must sellect incorrect statements the answers is
b c d
 
aditya chaudhari
Ranch Hand
Posts: 31
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Gino welcome to forum ,
i think you have missed question meaning. Following is question from mala G book which you mentioned.

Mala G book page 104 section 2.8. Q 2-1
Q 2-1 : Select all incorect statememts :

I guess you miss this incorrect word while reading question.

Now if question is asking to choose incorrect the statement as below :
Gino Fortunato wrote:A value can't be assigned to a primitive variable


is false b'cz Yes A value can be assigned to a primitive variable.

if you have just started looking at certification question be cautious while reading questions.
Happy Coding..!!!
 
Gino Fortunato
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
DOH! You are correct. I was confused by the 'double negative' of the false statement being incorrect. Thanks for pointing that out!
 
Roel De Nijs
Sheriff
Posts: 10666
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah, sometimes carefully reading (and understanding) the question is 80% of the work needed to answer correctly

It's possible you'll encounter such a question (or two) on the actual exam. It's another reminder that you'll need to be fully focused during the exam
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic