Pragramatically how to show that there is only one instance of Static variable irrespective of number of objects...
I thought of doing it by
1. showing their values being equal.. But the counter argument is that the "having the same value doesn't sufficient to say they are from the same variable"
2. equating the static variable's hash code accessing it from different objects. But Hashcode can't guarantee uniqueness.
is there any other way to prove that irrespective of number of objects there is only one static variable exists for a Class.
I don't think you are doing anything useful with that count. You can prove two objects are the same object with the == operator. On the object references. Since you have no way of increasing the count variable, it will always be th same for all instances of that class. If you did increment it, then all instances would have the same increment and th same value. So your test is no use to you.