Saturday 16 March 2013

What is the difference between static and non-static variables?

What is the difference between static and non-static variables? 
Static variable is a variable ,which is not repeated to each and every object .It is shared by all objects .It is also known as Class variable.Static methods only access the static variable.By default static variables are initialized to zero.

Non-static variable ,which is repeated to each and every object.
 



Blog Author: Vijay Kumar

Go to: Coding Problem Solutions

No comments: