Wednesday, March 18, 2009

What Is A Variable?

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.

  1. The variable name must start with an alphabet and can contain only alphabets , numbers,underscores and $ sign.
  2. It cannot have a blank spaces.
  3. Java keywords should not be used as variable names.
  4. Java is a case sensitive so a variable in uppercase is diffrent from the variable in lowercase.

No comments:

Post a Comment