Publish On: 2019-05-20

Guy white

Total Post: 819

Question: What is Java variable naming constraint

Reply On: 2013-10-19

Computer Science

Total Post: 1

ANS: What is Java variable naming constraint

The name that you choose for variables or classes or anything in java are called as identifiers.

Each variables has a name by which it is identified in the class. It’s a good idea to give your variables mnemonic names that are closely related to the values they hold. For example; it’s a good practice to create an identifier called name to hold the name of people, address to hold the address of people and so on. This helps in easy maintenance as well as quick debugging of the code.

Java variable names must start with one of the following characters:

(i) Letter

(ii) Underscore

(iii) Dollar sign

After the first character, java variable names can contain numbers. An identifier can be of any length.

Submit Your Answer

warning: Please Login To Submit Your Answer
Like Us On Facebook for All Latest Updates