Que: What is Identifier in JAVA?
Ans: Any name in a java program is called identifier. It can be a class name, variable name, method name, label name.
example:-
Q. How many identifiers are in the following program?
Ans is
(D)
Description:-
Test, String & System are class names means 3.
main() & println()are methods means 2.
args is a reference variable of String[] means 1
Hence there are total 3+2+1= 6 identifiers..Rules For Defining Java Identifier
Rules For Defining Java Identifier
Rule 1.
a to z
A to Z
0 to 9
$ and _
a to z
A to Z
0 to 9
$ and _
example:-
total_number (valid)
total# (invalid)
If we are using other than this we will get compile time error.

