what is a static object ?
Those having read kathy sierra would know how frequently it has been used ..i want to know why in certain questions a null pointer exception is thrown when the object is not declared static?
there is not any static object..
we can use final modifier while declaring a object..but that too doesnot mean that object is final it means refernce variable point to object is final..
well answer to why is just that
we can apply static modifier to variables and methods and init blocks
well if you still don't get the answer please write some code
and then specifically tell us what exactly do you want to know
have a nice time
It's easy to get terms confused! Wh don't we start with another situation in Java where "static" is used... can you give a different example of when you might use "static"?
hey abhimaran, i just wanted to know the use of static references? for me , here "animals a" is static because it has to be referred from main which is a static context and its for the class as you said, not for a particular object.
well, sorry for not being very clear about the question. i dont have the book right now with me . i will post in some days for what exactly i want to ask. Till then , Thanks so much and adios !