A <= B
in Java means A
is less than or equal to B
.Here's how you do it:
int A = 5;
int B = 10;
int C = 4;
if (A <= B) {
System.out.println("1) This will print!");
}
if (A <= A) {
System.out.println("2) This will print!");
}
if (A <= C) {
System.out.println("3) This will not print!");
}