关系运算符

 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 }

执行结果:

posted @ 2020-12-26 23:31  Eleanor123  阅读(117)  评论(0编辑  收藏  举报