boolean a = true;
boolean b = false;
System.out.println(a && !b);What is printed?
- Acheck_circle
true
- B
false
- C
0
- D
1
Explanation
!b is true, and true && true is true.
AP Computer Science A· difficulty 2/5
boolean a = true;
boolean b = false;
System.out.println(a && !b);What is printed?
true
false
0
1
Explanation
!b is true, and true && true is true.
Want 10 more like this — adaptive to your weak spots?