1.Java Language Overview

Source: Internet
Author: User

1. Software: System software vs application Software

2. People interacting with computers: using computer language.
Graphical interface vs command line mode dir MD Rd CD CD: Cd/del exit

3. Classification of languages: first generation: Machine Language second generation: assembly language Third generation: high-level languages (process-oriented---object-oriented)

Features of the 4.java language: ① Object-oriented ② robustness ③ cross-platform (write once, run anywhere)---JVM

5. Installing the JDK and configuring the PATH environment variable
1) Install the JDK in a fool's style.
2) The path that the Path:window operating system will search for when executing the command.
We need to save the path to the bin directory in the JDK: D:\Java\jdk1.7.0_07\bin under the PATH environment variable.
3) Test: In the Command Line window, any file directory, the execution of Javac.exe or java.exe can be called successfully.

> riverbed is like the bottom of the operation, the JDK is the river, and the Java application is like a ship.

Note: JDK JRE JVM

6. How to write and run the first Java program
"Procedure" is written----compiled----run
1) Write: Each Java file is a. Java end, called the source file "Helloworld.java". Java programs exist in the source file
public class helloworld{
The main method of the program is the entrance to the program
public static void Main (String args[]) {
The code to execute
System.out.println ("HelloWorld");
}
}

Note the point:
The Java source file has a "java" extension. The basic component of a source file is the class, such as the HelloWorld class in this class.
There can be at most one public class in a source file. The number of other classes is unlimited, and if the source file contains a public class, the file name must be named by that class name.
The execution portal for Java applications is the main () method. It has a fixed writing format: public static void Main (string[] args) {...}
The Java language is strictly case sensitive.
The Java method consists of a few statements, each with a ";" End.
Curly braces are all in pairs, indispensable.

2) Compile: In the directory where the source files are located, execute the javac.exe source file name. java; generate many bytecode files with a. Class ending
3) Run: Generated bytecode file is interpreted by Java.exe

7. Problems that occur in debugging programs

8. Note: ① single-line comment//② Multiline comment/* * * (Multiline comment cannot be nested)
③ Document Comment/** */javadoc-d file directory name-author-version source file name. java;

9.JDK documentation for all of its packages and classes: API

1.Java Language Overview

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.