public class ExOperator7 {
public static void main(String[] args) {
int x = 0;
int y = 0;
if ((!(x > 0)) && (!(y > 0))) { //(1)
x = 10;
y = 20;
}
if ((x > 15) ^ (y > 15)) { //(2)
System.out.println("演算子^は成立します。");
} else {
System.out.println("演算子^は不成立です。");
}
}
}
|