Beruflich Dokumente
Kultur Dokumente
An identifier in Java can denote a variable or method or class name or package or an interface. An
identifier allows the Programmer to refer the value from a different part of the program.
For example,
Whenever, 10 is required in the code, the programmer can use the identifier mangoes.
Java comes with clear cut rules to name an identifier. Java follows the same rules of C/C++.
Note: Always choose the identifier a meaningful word. Suppose you would like to store the number of
mangoes in the code, write as
int x = 10;
The problem in the above statement is x should be remembered for the number of mangoes which may
be tedious if variables are many.