Java Virtual machine
Garbage collection mechanism
Java program running Process
The difference between a compiled and interpreted language:
Compiled type: Directly can be compiled into the operating system can recognize the executable file format. For example: C, C + +
Interpreted type: First compiled into a Java virtual machine recognized file, through the Java Virtual machine and then interpreted as the operating system can recognize the file format. For example: Java
Garbage collection mechanism:
The Java language eliminates the responsibility of the programmer to reclaim useless memory space, which provides a system-level thread to track the allocation of storage space. And when the JVM is idle, examine and release which memory space can be freed.
Garbage collection is performed automatically during Java programs, and programmers cannot control and intervene precisely. (It also causes the program to run for a period of time, the phenomenon of sudden stuck, is the garbage collection mechanism in the work, it does not immediately go to reclaim memory, is a period of time to recycle, which may lead to our system bottleneck)
Development requires JDK (K is the meaning of the package)
User needs JRE (runtime Environment)
Two core mechanisms of Java (i)