jQuery in Action, 3rd edition
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes A query on keywords Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "A query on keywords" Watch "A query on keywords" New topic

A query on keywords

Rubayat Islam

Joined: Feb 11, 2007
Posts: 6
The words
  • true
  • false
  • null
  • are not enlisted in the complete list of keywords of the K&B book, page 6. It should mean that i can use these as identifiers in my code. But complier detects error if i do so. Why aren't these words enlisted in the list then?

    Silence is the true Friend that never betrays...
    Sunil Vasudevan
    Ranch Hand

    Joined: Mar 05, 2007
    Posts: 107
    Null, false and true are not listed in reserved keywords cause they are actually literals. Hence cannot be used as an identifier.

    And FYI, literals are constant value (String or number) used in Java programs.

    A link to a good read is provided below:

    Sunil.V<br />SCJP2, SCWCD1.4, SCBCD1.3
    I agree. Here's the link: http://aspose.com/file-tools
    subject: A query on keywords
    It's not a secret anymore!