关系运算符
1 package day02; 2 3 public class CompareDemo { 4 public static void main(String[] args) { 5 /* 6 关系运算符(比较运算符) : 7 8 (>) (>=) (<) (<=) (==) (!=) 9 10 */ 11 System.out.println(10 > 20); 12 System.out.println(10 >= 20); 13 System.out.println(10 < 20); 14 System.out.println(10 <= 20); 15 System.out.println(10 == 20); 16 System.out.println(10 != 20); 17 } 18 }
执行结果:
欢迎批评指正,提出问题,谢谢!