thanks
i know little... that Object is a super class of all classes.
and while reading about add() method in collections,it said that add(Object o) "here we can pass any object reference in the add method,Object class declares no state variables,only methods are declared".so i did not understand this statement
Yes, that is correct. The class java.lang.Object indeed does not possess any state / field variables. State variables are nothing but variables that are declared outside a method and inside a class in java. For example:
These are called state or instance variables as they define the state of an Object of that class.