Identify all Java programming language keywords.
Note on this objective: You may like to approach this objective on the basis of learning the less frequently used key words and ensuring you do not carry over any "false friends" from other languages you may know, particularly C/C++. The exam places significant emphasis on recognising keywords
You will come to recognise most of the Java keywords through using the language, but there are rarely used exceptions, and reserved words that might come up in the exam.
Examples of the more rarely used words (certainly for a beginner anyway) are
The words with asterisks are reserved and not currently used. Note that all of the keywords are in lowercase, thus for is a keyword but FOR is not. There is some debate as to if null is a keyword but I suggest that for the purposes of the exam you assume it is.
Which of the following are Java key words?
Which of the following are not Java keywords?
Note the upper case S on switch means it is not a keyword and the word then is part of Visual Basic but not Java
This is a keyword in C/C++ for determining the size of a primitive for a particular platform. Because primitives have the same size on all platforms in Java this keyword is not needed.
This topic is covered in the Sun Tutorial at
28 Dec 1999
copyright © Marcus Green 1999