ankitweblogic logo
W e b t u t o r i a l s

Define Java

C vs C++ vs Java

Java Virtual Machine

Set Java Path

Java Tokens

Reserved Keywords




Operator Precedence

Escape Sequences

Java Identifiers

Identifiers are designed by the programmer. They are used for naming classes, methods, variables, objects, labels, packages and interfaces in a program. Java identifiers follow the following rules:
1. They can have alphabets, digits, underscore and dollar sign characters.
2. They cannot begin with a digit.
3. Uppercase and lowercase letters are distinct.
4. They can be of any length.
Note: Identifier must be meaningful, short enough to be quickly and easily typed and long enough to be descriptive and easily read. For example: sum, average, totalMarks, PRINCIPAL_AMOUNT.