Getting Started with Java (1) program operation mechanism and running process

Source: Internet
Author: User

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

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.