Saturday, 22 June 2013

What are different variables types in Java

There are 3 types of variables in JAVA.


  1. Local Variables - This is used inside method for temporary purpose.
  2. Instance Class Variables - copy of this variable is created separately for each object.
  3. Static Class Variables - there is single copy of this variable for all objects.


No comments:

Post a Comment