Logical operators are used in conditional statements to combine two or more conditions.
Source Code
boolean a = true;
boolean b = false;
System.out.println(a && b); // Logical AND - false
System.out.println(a || b); // Logical OR - true
System.out.println(!a); // Logical NOT - false