java comparison operation

/ * 
Comparison operators: 
    Greater than> 
    Less than < 
    greater than or equal to> = 
    Less than or equal <= 
    equal ==   
    unequal =!

Note:
1, comparison of the results must be a boolean value, the establishment is true, not true is false
2, if the judge several times, not attached to write
the wording of mathematics among: 1 <x <2 program which does not allow it kinds of writing

*/
public class Demo02perator{
    public static void main(String[] args){
        System.out.println(10 > 5); //true
        int num1 = 10;
        int num2 = 12;
        System.out.println(num1 > num2); // false
    } 
}

 

Guess you like

Origin www.cnblogs.com/spp666/p/11672423.html