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)