You can use cmd command line to run Java in Windows, the running process is as follows:
javac name.java //Compile
java name //Run
Run java name.java directly in Linux
//test_1 HelloWorld
package Day_1;
public class HelloWorld {
//main方法,是程序执行的起点
public static void main(String[] args){
//打印信息
System.out.print("Hello,World!!!!!!!!!");
System.out.print("真好!");
}
}
Character type:
Integer: int 1 2 123 94798470 -12331
Floating point number (decimal constant): 2.5 -3.14 0.0
String constant: "something surrounded by double quotes"
Character constant:'constant enclosed in single quotes'
Boolean constant: true false
Empty constant: null ---cannot be printed directly
Note: the double quotation mark can be empty
Single quotation marks cannot be empty or have multiple characters
------------------Keywords:
1. Completely lowercase letters (such as: public, not, true, flase, int, static...)
2. There are special colors in the enhanced programming tool
type of data:
Basic data types:
-----Integer byte(1) short(2) int(4) long(8)
----- Floating point type float (4) double (8)
-----Character type char
-----Boolean boolean
Reference data type:
-----String, Array, Class, Interface, Lambda
(to be continued)