1 short circuit with &&, when the left is false, do not execute to the right;
Short Circuit or | |, when its left is true, does not execute to the right.
2 int a=1;
if (a++==2) {
A = 7;
}
System.out.println (a);
The output is 2, because when + + is on the right side of a, the first to determine whether a is equal to 2, and then add 1, when + + on the left of a, the first to add 1, and then determine whether equal to 2
3 referencing the scanner data type format:
First in the class outside the Guide package import Java.util.Scanner;
Then create the new object in the class with the data type Scanner sc = new Scanner (system.in);
again to invoke the functionality in the object int i = Sc.nextint ();//used to receive console input numbers
string s = Sc.next ();//A string used to receive console input
4 referencing the random data type format
First in the class outside the Guide package import java.util.Random;
Then create the data type new object in the class Random rd = new random (), and then invoke features in the object
again to invoke the functionality in the object int i = Rd.nextint (10);//random integer used to receive "0,10"
Double s = rd.nextdouble ();//random decimals used to receive "0.0,1.0"
Java Basics Review -2 (Boolean short-circuit problem, operator precedence, and reference data type)