True in Java, false, NULL is not a keyword
There are 11 types of data in Java, eight of which are basic types, others are reference types
Integer byte (1) short (2) int (4) long (8)
Float type float (4) Doubie (8)
Character Char (2)
Boolean Boolcan (indeterminate, determined by the JVM)
Variable: variable fame (short_x) (int_age) (float_salary)
Data type + variable name = initial value
Perform automatic type conversions from low precision to high precision
Bytr<short<int<long<fioat<double
Big turn small to strengthen the system ()
Boolean: Boolean can only contain true and false
Character type: Single quotation mark for character literal, column as ' A '
String: Java has a class named Sting that represents a string object
Any object in Java can be converted to a Sting object
Constants: final+ data type + constant = constant
The inside of a Java Virtual machine consists of (a class loader) (runtime data area) (The execution engine)
Java virtual machines have a method area and a Java heap
Operator: symbol in front, first count after use. After the symbol is used, use it first.
+ = a+=b a=a+b%= a%=b a=a%b y=x++; x=5; Y=6
% (modulo) in addition to the remainder of this number 5%3=2 10%2=0
Shift Operator: Shift Left (") multiplied by 2 n Power shifted right (") divided by 2 n power
3 "5;3*2*2*2*2*2 40" 3; 40/2/2/2
Boolean operator;&& | | These two operators will short-circuit the first false, and the second will not be computed
& | No short circuit, two of them are counted.
^ different or the same is false, the difference is true ~ non-~0=-1 take the opposite number minus 1
Trinocular operation: 1? Represents 2:3
Expression 1 was established into the expression 2, will not enter the representation 3
Indicates that 1 does not enter the representation 3, does not enter the representation 2
Java Comment: (single-line comment) (multiline comment) (Javadoc comment)
Summary of the second chapter