title: what is the use of keeping reference of an object as static in Java?
body: <p>As per my understanding any static method or member belongs to whole class so that all instances of that class can share that common resource however in many places I have seen that programmer keep object reference as static while creating an object. I'm not able to understand this. Any explanation in this context will enhance my understanding. Thank you</p>