代码
提交代码
public class BooleanExpression1 { public static void main(String[] args) { // 初始化两个整型变量a、b,值分别为2、3 int a = 2, b = 3; // 分别打印比较运算符比较的结果 System.out.println(a == b); System.out.println(a != b); System.out.println(a > b); System.out.println(a < b); System.out.println(a >= b); System.out.println(a <= b); } }
运行结果