In this example we will show you how to use logical operator in Java.
Logical operator
Source Code
package com.beginner.examples;
public class LogicalOperator {
public static void main(String[] args) {
int a = 3;
System.out.println(a > 5 && a < 7); // use logical operator
}
}
Output:
false