Saturday, May 03, 2008

Variables in Java

There are 2 types of variables in Java, primitive and reference variables. A primitive variable holds the real value of the variable while a reference variable holds the memory address of where the real value of the variable is stored.


Identifiers must be named according to the following rules:
1. The first character of an identifier must be a letter, an (_) underscore or a ($) dollar sign.
2. After rule number 1, the succeeding characters can be digits.
3. Reserved words are not allowed.

No comments: