The logicalAnd() method of Java Boolean class returns the result of implementing logical
AND operation on the specified Boolean operands.

Syntax:
public static boolean logicalAnd (boolean a, boolean b)

Parameters:
The parameters ‘a’ and ‘b’ represents first and second operands.

Return Value:
The logicalAnd () method returns the result after implementing logical AND operation on the parameters a and b.
 It returns true, if and only if both the parameters are true.
 It returns false, if either of the parameter is false.

Example 1

Output

Example 2

Output

Example 3

Output:

Pin It on Pinterest

Share This