Java Fundamentals (Chapter one)

Source: Internet
Author: User

Java Fundamentals (Chapter one)

1, Java is an object-oriented high-level programming language.

2, Java includes: Javase (Java Foundation) Java EE (Java Enterprise Application)

First, write Java program with Notepad

1. Create a Java source file with a. java extension

2. Compile the Java source file and produce a bytecode file with a. class extension

In the DOS command window, enter [Javac file name. java] and return

3. Execute Java Program

In the DOS command window, enter [Java file name] and return

Ii. framework of Java programs

Public class class name {

P

1, Java is an object-oriented high-level programming language.

2, Java includes: Javase (Java Foundation) Java EE (Java Enterprise Application)

First, write Java program with Notepad

1. Create a Java source file with a. java extension

2. Compile the Java source file and produce a bytecode file with a. class extension

In the DOS command window, enter [Javac file name. java] and return

3. Execute Java Program

In the DOS command window, enter [Java file name] and return

Ii. framework of Java programs

Public class class name {

public static void Main (string[] args) {

                     // in this method, the output information

System. Out. println (" content to output ");

}

}

★ Note: The ⑴ class name must be the same as the file name, and the first letter of the class name is uppercase;

⑵ (String) must be uppercase S;⑶system is preceded by an uppercase s;

(4) all symbols () {}, (),; "" are all entered in the English state;

"A program can have only one main () method;

System.out.println (); Automatic line wrapping after printing output information;

System.out.print (); The message will not be automatically wrapped after printing;

(println ("")=print ("\ n")) "

Ublic static void Main (string[] args) {

                     // in this method, the output information

System. Out. println (" content to output ");

}

}

Java Fundamentals (Chapter one)

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.