First, review the section focuses on arithmetic operators
what Consider the following code, the result is?
public class Test {
public static void main(String[] args){
int i=1;
int a=i++;
int j=1;
int b=++j;
System.out.println(i);
System.out.println(a);
System.out.println(j);
System.out.println(b);
}
}
Run your own answers come after inspection
Comparison Operators
Comparison operators: calculates comparison data between the two, the return value of type Boolean (true or false).
For example as follows:
public static void main(String[] args) {
System.out.println(100==100);//true
System.out.println(100<200);//true
System.out.println(300>400);//false
System.out.println(300<=400);//true
System.out.println(300>=400);//false
System.out.println(300!=400);//true
}