Chapter II Initial Java

Source: Internet
Author: User

Initial Java Features

Simple, object-oriented, cross-platform, secure, multi-threaded.

PS: "Simple", which I think is relative to the lower level of the language, "cross-platform" should be the Java language most proud of the label; "Object-oriented" is a deep understanding of Java programming methods and ideas.

Environment

The environment here refers to the programming environment, the compilation and interpretation environment, and the operating environment. PS: Interpretation may not be appropriate, subsequent modification.

    • Jdk:java Development Kit is the development Kit tool;
    • Jre:java runtime Environment is the runtime environment;
    • Jvm:java virtural Machine is the Java VM;
    • Java SE API: such as IO, GUI, network, etc.;
Environment variable Configuration
    • Java_home Configuring the directory for the JDK;
    • CLASSPATH specifies the runtime's class code, such as Tools.jar, Dt.jar;
    • path Specifies the location of the executable program, and Java_home and classpath need to be added to it.
Understanding Java Program Basic file Unit-class
    • The file name must be the same as the public-decorated class name, with. Java as the file suffix, and if the defined class is not public, the file name can be different from the class name;
    • A. java file can have multiple classes, but only one class that is public-modified;
    • After the Java source code file is compiled, a class corresponds to a. class file;
    • A Java application should contain a main method, which is an application's entry method that can be defined in any class, not necessarily the public-decorated class.
Compilation Interpretation execution
    1. Programmers write Java source code (. java files);
    2. java compiler, compiled by the javac command. Java source code;
    3. The Java bytecode file generated by the Javac command, the. class file is independent of the operating system platform, which is the cross-platform feature;
    4. The Java interpreter, through Java commands, invokes the. Class bytecode file, which is then interpreted by the JVM as a machine language that the computer can understand to execute Java code.

PS: I think the JVM is the key to the Java language cross-platform.

Chapter II Initial Java

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.