Java Boolean logicalAnd() MethodThe logicalAnd() method of Java Boolean class returns the result of implementing logical AND operation on the assigned Boolean operands. Syntax:Parameters:The parameters passed are a ( first Boolean operand) and b (second Boolean operand). Return Value:The logicalAnd() method returns the result of applying logical AND operation on Boolean parameters a and b. Example 1Test it NowOutput: 1. logicalAnd() method for true true is true 2. logicalAnd() method for true false is false Example 2Output: Enter your percentage. 63 Sorry! You have failed. You needed 1.0 more marks to pass. Try again next year. Example 3Output: Enter two number. 0 0 Divide = 0/0 Division is not possible. Next TopicJava Boolean |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India