First, let's look at how the Java program works at the bottom:
There are two core mechanisms of Java:
Java Virtual machine (Java Vsan):
1, the Java Virtual machine can be understood as a byte code for the machine instruction CPU.
2, for different platforms, there are different virtual machines.
3. The Java Virtual machine mechanism masks the difference between the underlying platform and realizes "compile once, run anywhere".
garbage collection mechanism (garbage collection)
1. No longer used memory space should be recycled--garbage collection
2. The Java language eliminates the responsibility of the programmer to reclaim the useless memory space in relation to C + +; Provides a system thread to track the allocation of storage space. And when the JVM is idle, check and release the memory space that can be freed.
3, garbage collection in the Java program run automatically, the programmer can not precisely control and then intervene.
Garbage collection mechanism--java and C/C + +
First, who is doing garbage Collection?
Second, when is the object discarded?
Third, discard is recycled?
Is it useful to have no reference to the object that the variable points to?
V. Can the application interfere with garbage collection?
Vi. What to do when the object is recycled
http://blog.csdn.net/yi_zz/article/details/7285637
Getting Started with Java (1) program operation mechanism and running process