KnowledgeBoat Logo
|

Computer Applications

What is an identifier ? What is the identifier forming rule(s) of Java?

Values & Data Types Java

21 Likes

Answer

Identifiers are the names given by the programmer to various program units of Java. Identifiers are the names of variables, methods, classes, packages and interfaces etc.

Identifier forming rules of Java state the following:

  1. Identifiers can have alphabets, digits, _ (underscore) and $\text{\textdollar} characters and can be of any length.
  2. They must not be a keyword or Boolean literal or null literal.
  3. They must not begin with a digit.
  4. Java is case sensitive i.e., upper-case letters and lower-case letters are treated differently.

Answered By

13 Likes


Related Questions