Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dr. Hunt's error?

 
Guilherme Silveira
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I find it weird I did not find questions about the ones ill mention....
It might be my misunderstanding of english, so please, let me know:
Question 6
Which of the following are Java keywords (as opposed to reserved words)?
A. goto
B. malloc
C. extends
D. FALSE
Answer in the mock: A,C
Comments: goto is a reserved word. Just like const. BTW null, true and false are literals and not keywords. At least thats what I read. Is it right?
Going further, it asks for the keywords and sazs (as opposed to reserved words).... so?
I have found many problems like these in other mocks that i took.... showing true, false and null as keywords.... can anyone assure me that they are literal's (by the java specification) and not keywords? goto and const are reserved and not keywords?

So, enough about keywords talking.... but please, help me with some specification base, as there is no other way around keywords...
Thanks a lot
Guilherme
 
Mr. C Lamont Gilbert
Ranch Hand
Posts: 1170
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe your understanding is correct. though I have heard that early versions actually did use goto as a keyword.
 
Ron Newman
Ranch Hand
Posts: 1056
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the Sun objectives for the new 1.4 exam, they explicitly state:
Note: There will not be any questions regarding esoteric distinctions between keywords and manifest constants.

I don't know if this is true for the 1.2 exam as well, but it probably is. When I took the 1.2 exam this week, I was asked "Which of the following are legal identifiers".
 
Chen Lynn
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I read several Books About JAVA,and some Mock Exam
I find SCJP treat reserved word as Keyword in many Papers.
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
FALSE isn't even a literal in Java. Now if we were talking about false...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic