Identifiers are names of methods, classes, variables, interfaces and packages in java.
1. Rules governing identifiers are
a. An identifier must be composed of letters, numbers and
underscore and dollar sign. It must contain atleast a single
character
b. Identifier must begin with letter, underscore or dollar.
c. Identifier should not begin with a number
2. Yes, identifiers can be re-used in the same java file multiple
times
3.
a. My Var //Can not contain space
b. __$ //Must contain atleast a single letter
c. var- // - is not a valid alphanumeric character
d. 4z //can not start with number
Get Answers For Free
Most questions answered within 1 hours.