A variable is a name of memory location , which can store one constant at a time. Like constants, variable can also be any one of the eight primitive data types.
Every variable is identified by a variable name. The following points should be kept in mind when deciding the variable name.
Every variable is identified by a variable name. The following points should be kept in mind when deciding the variable name.
- The variable name must start with an alphabet and can contain only alphabets , numbers,underscores and $ sign.
- It cannot have a blank spaces.
- Java keywords should not be used as variable names.
- Java is a case sensitive so a variable in uppercase is diffrent from the variable in lowercase.
No comments:
Post a Comment