Compound Boolean Expression Evaluation
What does the program print when executed?
public class Main {
public static void main(String[] args) {
int x = 2;
int y = 3;
if(x * 2 > y || (y / x) == 1)
System.out.println("Pass");
else
System.out.println("Fail");
}
}
A
Fail
B
Error
C
Nothing
D
Pass
Question Leaderboard
| Rank | |||||
|---|---|---|---|---|---|
| #1 | hitrishabhatia | 1 | 2 | 0m 00s | 90 |
| #2 | bommasam000 | 1 | 1 | 0m 29s | 71 |
| #3 | y.seong2027 | 1 | 1 | 0m 34s | 66 |
Items per page:
10
1 – 3 of 3
APFIVE