Quote from website: http://www.artima.com/insidejvm/ed2/jvm6.html
The Heap
Whenever a class instance or array is created in a running Java application, the memory for the newobject is allocated from a single heap. As there is only one heap inside a Java virtual machine instance, allthreads share it. Because a Java application runs inside its "own" exclusive Java virtual machine instance,there is a separate heap for every individual running application. There is no way two different Javaapplications could trample on each other's heap data. Two different threads of the same application,however, could trample on each other's heap data. This is why you must be concerned about propersynchronization of multi-threaded access to objects (heap data) in your Java programs.
The Java virtual machine has an instruction that allocates memory on the heap for a new object, but hasno instruction for freeing that memory. Just as you can't explicitly free an object in Java source code, youcan't explicitly free an object in Java bytecodes. The virtual machine itself is responsible for decidingwhether and when to free memory occupied by objects that are no longer referenced by the runningapplication. Usually, a Java virtual machine implementation uses a garbage collector tomanage the heap.
关于java生成对象的堆:
每一个java application分配了一个heap, 并在这个堆上为新的对象分配空间。多个县城可共同访问这个堆上的空间。