+ 2
Difference between static variable and non-static variable (instance variable)?
Static variable:- ( eg static int a=3) which is accessible in both static and non static block or method. non Static variable:- (eg int a=3) which is can't be accessed in static block or method.
2 Answers
+ 4
static belongs to the class and non static belongs to objects created from the class
0
igor- u mean static variable belong to class and non stati variable belong object