Two core mechanisms of Java (i)

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.