Objects are the basic unit of object orientation with behavior, identity.
These are part of a class but are not the same. An object is expressed by the variable and methods within the objects.
These variables and methods are distinguished from each other as instant variables, instant methods and
class variable and class methods.
* All objects are allocated on the heap.
* Objects consist of instance fields for the class of the object, plus instance fields for its superclasses.
* Every object is created by a class constructor. Interfaces don't have constructors.
Reference variables :
* All non-primitive variables contain only references to objects on the heap.
They never contain the object. C++ object variables may be either,
but Java supports only object references.
For Example :
Book bookvar = new Book("Java");
bookvar is not an object, it's a variable which contains a reference to an object.
Objects don't have names, just types and locations in memory (and, of course,
fields and methods).
Create a new Book object in memory.
Initialize it with the data sent as arguments to a constructor.
When created, assign a reference to that object to the Book variable bookvar.
"bookvar" is a reference or object type variable which may reference a Book object or
an object of any subclass of Book.
For more information on http://www.roseindia.net/java/beginners/oop-in-java.shtmlhttp://www.roseindia.net/java/java-tips/oop/oop-summary.shtml