Develop code that declares, initializes, and uses primitives, arrays, enums, and objects as static, instance, and local variables. Also, use legal identifiers for variable names.

Variable Identifiers

Variable names must be legal Java identifiers:

The following are not legal variable names:

My Variable              // Contains a space 
9pins                    // Begins with a digit 
a+c                      // The plus sign is not an alphanumeric character 
testing1-2-3             // The hyphen is not an alphanumeric character 
O'Reilly                 // Apostrophe is not an alphanumeric character 
OReilly_&_Associates // ampersand is not an alphanumeric character 

Keywords: 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 while

The goto keyword is not used.

The const is also not used.

The assert is a new keyword added with Java 1.4

The enum is a new keyword added with Java 5.0

Professional hosting     Belorussian informational portal         Free SCWCD 1.4 Study Guide     Free SCBCD 1.3 Study Guide     Free SCDJWS 1.4 Study Guide     SCDJWS 1.4 Quiz     Free IBM Certified Associate Developer Study Guide     Free Mock Exam Engine     IBM Test 000-287. Enterprise Application Development with IBM WebSphere Studio, V5.0 Study Guide