Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java Keywords

 
Animesh Shrivastava
Ranch Hand
Posts: 298
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If a question asks for what are not java keywords, and "true", "false" , "null" are few of the given options. Then we can blindly mark these as the correct options, because "true", "false" and "null" are reserved words and not keywords

am i right?
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes , they are reserved literals . They are not keywords . But like if you have question which one is not keyword in Java and you have options like 1] null 2] new 3] import 3] include .. then choose include as an answer ... although it will not be in the exam ....
 
Wasim Ayoubi
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there

open this link, you'll find the answer there
http://java.sun.com/docs/books/tutorial/java/nutsandbolts/_keywords.html
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Practically speaking, the exam does not distinguish between keywords and reserved words. You won't be asked about either term - but you may be shown an example that won't compile because you've tried to use a keyword or reserved word as an identifier. So the distinction between the two doesn't matter, but you do need to know that both "for" and "true" are not allowed as identifiers.
 
Animesh Shrivastava
Ranch Hand
Posts: 298
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks all,
So i expect such kinda questions not to appear in the exam.
Thanks again
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic