代码
提交代码
class LogicOperators {
public static void main(String[] args){
int a = 1, b = 2;
if((a == 2) && (b == 2)) {
System.out.println("a和b都等于2");
}
if((a == 1) || (b == 1)) {
System.out.println("a等于1或b等于1");
}
}
}
运行结果