Java Face question 01

Source: Internet
Author: User

JavaBasic1. The difference between the JDK and the JRE

A: The JDK is a standard for the Java SDK that contains tools, as well as the libraries needed to develop Java programs, and it also contains compilers and debugging tools.

The JRE is the Java Runtime Environment, which is included in the JDK, and the JRE provides the necessary libraries as well as the JVM as it is necessary to run the Java program.

2. What is a Java virtual machine

A: The Java VM (Java Virturl machine JVM) is an abstract machine for executing Java bytecode, different hardware platform JVMs are different, the JVM itself is platform-dependent, the JVM is responsible for loading validation and executing bytecode.

3. What types of memory areas are in the JVM

A: In Java, the JVM allocates memory to different processes, methods, and objects, and the memory area is divided as follows:

    1. Class Loader: It belongs to a component of the JVM for loading class files
    2. Class (method) area: It stores the structure of each class, such as the constant pool at run time, the field and method data, and the code of the method.
    3. Heap: The heap is created by the runtime and contains data that is assigned to the object at run time.
    4. Stacks: Stacks store local variables and partial run-time results, and it also facilitates method invocation and return, where each thread creates a private JVM stack when its thread is created.
    5. Program counter: This memory area contains the address of the command that the JVM is currently executing.
    6. Local method Stack: This area is the area of memory reserved for all local methods in the application.
4. What is the JIT compiler

A: JIT full name: Just in time, timely, timely compiler is mainly used to improve the performance of Java, it is open by default, it is the earlier processing of the compile time to run more good run, Java has been widely used in the JVM JIT compiler.

Java Face question 01

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.