What is difference between the following in java :
Emp e = new Emp();
Emp e = new Local();
An object is, essentially, a chunk of memory living in the heap. (Part of the memory structure of objects includes a reference to the class of that object.)
Object variables in Java (like
e, in this example) contain references to objects living in the heap.
Classes are completely different from all of these; they might describe the structure of objects of that type, and have method implementations and the like, but classes live in an entirely different area of memory from other objects.