• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java Keywords!

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone,
I have a confussion! Please follow:
(a) Boolean
(b) BOOLEAN
(c) boolean
I know (c) is a keyword but what about (a) and (b)?
Thanks for your reply.
regds,
mondal
 
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First of all, remember all the Java keywords are lowercase. So you know immediately, there'is only one possible answer.
Secondly, check the most authoritative Java keyword list at JLS 3.9. Disregard all other lists after memorizing this one.
 
sabyasachi mondal
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Tom Tang:
First of all, remember all the Java keywords are lowercase. So you know immediately, there'is only one possible answer.
Secondly, check the most authoritative Java keyword list at JLS 3.9. Disregard all other lists after memorizing this one.


Thank you Tom. Tom I see that I am still in dbt with the keywords
goto and const. RHE books says they are reserved but have no meaning in Java. Would you please help further?
 
Tom Tang
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
goto and const are reserved but not used, so you can't use them as varible names. Just think of them as spare tires.
 
Tom Tang
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
According to JLS, The keywords const and goto are reserved, even though they are not currently used. This may allow a Java compiler to
produce better error messages if these C++ keywords incorrectly appear in programs.
 
sabyasachi mondal
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Tom Tang:
According to JLS, The keywords const and goto are reserved, even though they are not currently used. This may allow a Java compiler to
produce better error messages if these C++ keywords incorrectly appear in programs.


Thank you again.
So still in the jexam2 (if any) I can say that goto is a reserved word.

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
But what about cast .Is it key word?In some books it mentioned that it is a key word.Also I am having doubt reg true ,false and null .Actually these are literals.Shall we consider them as KEYWORDS ?i.e.,If these options are included in multiple choices of identifing key words.
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
SOrry for my naive question. What exactly does JLS mean? I heard it a lot. Is it a book? And where can I find it.
thanks a lot
Ben
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JLS - Java Language Specification
URL :
http://java.sun.com/docs/books/jls/html/index.html
Cheers
 
Beginner Ben
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot, Morgan. have a great weekend
Ben
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Or, the Java language specification can be
purchased at:
http://www.amazon.com/exec/obidos/ASIN/0201310082/internetconcierg
or:
http://www.enterprisedeveloper.com/jcertify/download/index.html
 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I may be wrong here, but back to the original question of:
BOOLEAN
Boolean
boolean
(or something like this)
java is case sensitive so if I was taking the exam I would look at this and think I knew boolean was correct, but that it couldn't be the other two because then they would be something different.
Maybe that's looking into it too much, and there is nothing stoping them from making those keywords as well just cause they can, though they aren't as far as I know.
Just rambling.
 
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Mondal,
"Keywords are reserved words but reserved words are not keywords."
Correct me if i am wrong on this:
There are 50 Keywords is java. Out of which const and goto are reserved keywords word not currently in use. Three identifiers are reserved as predefined literals (A literal denotes a constant value) in the language: null, true, false.
But for the purposse of exam: null, true and false could be taken as keywords because they have some pre-defined meaning and use in java.
Regards
Raj.
 
reply
    Bookmark Topic Watch Topic
  • New Topic