Learn java together [1] --- prepare activities (concepts)

Source: Internet
Author: User

1. a program written in java requires a compilation step. However, this compilation step does not generate a specific machine code, but generates a platform-independent bytecode: *. class file;
 
2. java is both a compilation language and an explanatory language. This is mainly because the bytecode generated during the compilation process cannot be executed, the interpreter of java must be used before execution;
 
3. The interpreter for interpreting bytecode in java is called a java Virtual Machine (JVM;
 
4. There is a process to note: the JVM on all platforms provides the same programming interface to the compiler, while the compiler only needs to generate code that can be understood by the virtual machine, then the virtual machine will explain the execution;
 
5. Steps for executing the java program: First, we have written the java source program. At this time, we need to compile it with javac. Here javac refers to the compiler, And the compiler generates *. the class file, that is, the bytecode, is then interpreted and executed in the java interpreter JVM to generate the machine code for a specific platform;
 
6. In short, it is first compiled and then interpreted before being recognized by the system. Therefore, it is further explained that java is both a compilation language, it is also an explanatory language;
 
7. the Java Virtual Machine specification developed by Sun sets the unified JVM standard technically:
Format, stack, garbage collection heap, and storage zone of instruction sets, registers, and class files;
The purpose of these specifications is to provide uniform standards and ultimately implement platform independence of java programs;
 
8. What is the platform independence of java programs? Because the JVM provided by different platforms is different, the bytecode of the java program file generated during compilation can be read and used by the platform after JVM interpretation. Therefore, the java program is irrelevant to the platform.
Author: "Li Yuan Cao"

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.