CJCoding With Joseph
15free / daySign inCreate account
Back to Code Walkthrough

Boolean Logic Operators

Java code walkthrough · Question 18
easyIf Statements

Code

Read carefully. What does this print?
1public class Main {
2 public static void main(String[] args) {
3 boolean a = true;
4 boolean b = false;
5 System.out.println(a && b);
6 System.out.println(a || b);
7 System.out.println(!a);
8 }
9}

Your answer