Class: A class defines the properties and behavior (variables and methods) that is shared by all its objects. It is a blue print for the creation of objects. The primitive data type and keyword void is work as a class object.
Object: Object is the basic entity of object oriented programming language. Class itself does nothing but the real functionality is achieved through their objects. Object is an instance of the class. It takes the properties (variables) and uses the behavior (methods) defined in the class.
For memory Management examples visit to :http://www.roseindia.net/java/java-get-example/