CJCoding With Joseph
15per day
← Back to Question List
Java Code Walkthrough #18

Boolean Logic Operators

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