• 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
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

A question for Maha

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maha ,I want to know which are the java keywords,and which are the java reserved words.
There is lots of confusion regarding it.
According to me "goto" and "const" are the java reserved keywords
and rest are plain keywords
 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
PMJ,
I'm not Maha.
Hope you/Maha won't mind!!
Actually, there are 48 keywords in java, which are reserved, which you can't use as identifiers. Moreover, true, false and null are not keywords but reserved words, which also cannot be used as identifiers.
For a list of keywords and reserved words, refer to http://java.sun.com/docs/books/tutorial/java/nutsandbolts/_keywords.html .
goto and const are keywords. Their significance is that - though they are keywords, they are as such not used in Java 2.
Actually, the difference between keywords and reserved words is a matter of much confusion!!
Regards,
Suresh.
 
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Pmj,
I understand your thinking. Once I also got bugged of the words keywords/reserved words, litrals etc. From the exam point of view, check if the given word can be used as a name for a variable. If yes, then it is not a keyword/reserved word or whatever. Otherwise it is not.
The exam checks this point. The link given by Suresh is the one you shd check for.
Suresh,
Not at all. (Don't mind part ... ). Thanks for your help.
regds
maha anna
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Maha,
Actually that is a simple question but we should give the answer
which SUN expects ,and I don't want to miss such a question due
to confusion in terminology
Thanks to Suresh too
PMJ
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Maha,
Actually that is a simple question but we should give the answer
which SUN expects ,and I don't want to miss such a question due
to confusion in terminology
Thanks to Suresh too
PMJ
 
Ew. You guys are ugly with a capital UG. Here, maybe this tiny ad can help:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic