- 3. Java - Language Constructs I
Names and Identifiers, Variables, Assignments, Constants, Datatypes, Operations, Evaluation of Expressions, Type Conversions
85
Names and Identifiers
A program (that is, a class) needs a name
public class SudokuSolver { ...
Convention for class names: use CamelCase → Words are combined into one word, each starting with a capital letter Allowed names for “entities” in a program: Names begin with a letter or _ or $ Then, sequence of letters, numbers or _ or $
86
Names - what is allowed
_myName TheCure __AN$WE4_1S_42__ $bling$ me@home 49ers side-swipe Ph.D’s strictfp ?!
87
Keywords
The following words are already used by the language and cannot be used as names:
abstract continue for new switch assert default goto package synchronized boolean do if private this break double implements protected throw byte else import public throws case enum instanceof return transient catch extends int short try char final interface static void class finally long strictfp volatile const float native super while
88