Posted on: 10/15/2013 9:42:21 AM | Views : 659

Hello,
In my class I have declared :- public static int counter;
I am using value of counter in multiple functions with in this class... Is my declaration correct? 
OR, should it be:- public int counter; ??
-----
Specifying it as static means that if 2 users are using this class simultaneously OR if same user is using 2 instances of this class, then, the value of counter will be set to the last updated value, and some users/ instances might get wrong values, I am woried about this. please guide...
-----
Object A suppose variable value is A.Var=5 and object B sets to B.Var=2, then wont values of obj A A.Var get set to 2 also??

Go to the complete details ...