J2EEOnline J2EE   

Java Certification  «Prev  Next»
Lesson 5Java Identifiers and Keywords:
ObjectiveLearn the syntax of Java Identifiers and keywords.

Java Identifiers identifiers and language keywords

Identifiers are used to name elements of Java programs, such as classes, interfaces, variables, methods, constructors, and arguments. A valid name begins with a Unicode letter, underscore character (_), or dollar sign ($). A Unicode letter is an English letter (a-z) or (A-Z) or a letter in a non-English language. The second and remaining letters of an identifier may be a Unicode letter, underscore, dollar sign, or digit (0-9). The dollar sign character is used by compiler-internal identifiers and should be avoided.
Identifiers are case sensitive. The identifiers myID and MyID are considered to be separate identifiers. An identifier may not use the literal values, true, false, null, or any of the keywords that are reserved by Java.
53 Java Keywords
The Java language reserves a list of 53 keywords.
Keywords may not be used as Java variables.

abstract assert boolean break
byte case catch char
class const continue default
do double else enum
extends false final finally
float for goto if
implements import instanceof int
interface long native new
null package private protected
public return short static
strictfp super switch synchronized
this throw throws transient
true try void volatile

Keyword Identifier - Quiz
Click the Quiz link below to check your understanding of the main() method, identifiers, and keywords.
Keyword Identifier - Quiz