Java Variables


      

                                                      Java Variables




              A variable is a container that holds the value while the java program is executed.

              A variable is assigned with a datatype. 


         Variable

            Variable is the name of the reserved area allocated in memory. In other words, it is a 

            name of a memory location. It is a combination of "vary+able" which means its

             value can be changed.

          

           Types of Variables

          There are three types of variables in Java.


  1. Local Variable.
  2. Instance Variable.
  3. Static  Variable.                   

No comments:

Post a Comment