Java language running mechanism and running process

Source: Internet
Author: User

Features of the Java language

1. Object-oriented

1.1 Two basic concepts: classes, objects

1.2 Three main features: encapsulation, inheritance, polymorphism


2. Robustness

absorbs the advantages of the C + + language, but removes parts that affect program robustness (such as pointers, memory requests and releases, etc.), providing a relatively secure memory management and access mechanism


3. Cross-platform

3.1 applications written in the Java language can be run on different system platforms.

Write Once,run Anywhere

3.2 Principle: Just install a Java Virtual machine (JVM Java VM) on the operating system that needs to run the Java application. The JVM is responsible for the operation of the Java program in the system. The JVM is different in different operating systems.


Two core mechanisms of Java

1.java virtual machines (Java virtal machine)

the JVM is a virtual computer that has instruction sets and uses different storage areas. Responsible for executing instructions, managing data, memory, registers.

For different platforms, there are different virtual machines

The Java Virtual machine mechanism masks the difference between the underlying platform and implements a compilation and runs everywhere.

2. Garbage collection mechanism (garbage Collection)

memory spaces that are no longer used should be recycled-garbage collected.

In languages such as C or C + +, the program Ape is responsible for reclaiming useless memory.

Garbage collection is carried out automatically in the Java program, Cheng can not control and intervene precisely.

Java language running 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.