Java entry operation

Java program structure

Insert picture description hereInsert picture description here

Output information from the console

//Automatically wrap after printing
System.out.println("output information")
//not automatically wrap after printing
System.out.print("output information")
*The first letter must be capitalized and all symbols are in English format.

Escape character
\n: move the cursor to the first cell of the next line
\t: move the cursor to the next horizontal tab position

Java notes

Single-line comments: Only one line of comments can be written, which is the simplest type of comment and is used for simple description of the code.
Format://Single-line comment
Multi-line comment: generally used to explain more complex content, such as complex program logic and algorithm implementation principles.
Format:
/*
Multi-line comment
*/

Java coding standards

1. Use public to modify the class name
2. Write only one sentence on a line
3. Use and position of {}
4. Code indentation

to sum up

Insert picture description here

Guess you like

Origin blog.csdn.net/Yoona_1/article/details/112599202