Core Concept of java object

Where java object is created ?
----------------------------------------------------
In Java, all objects are dynamically allocated on Heap.In Java, when we only declare a variable of a class type, only a reference is created (memory is not allocated for the object). To allocate memory to an object, we must use new(). So the object is always allocated memory on heap .

Comments

Popular posts from this blog

Git Commands With Output Log

Java Interview Preparation (conceptual)

Java 8 Function Interface