Java Boolean logicalOr() MethodThe logicalOr() method of Java Boolean class returns the result of implementing logical OR operation on the assigned boolean operands. Syntax:Parameters:a - This is the first Boolean operand b - This is the second Boolean operand Return Value:The logicalOr() method returns the result of applying logical OR operation on Boolean parameters a and b. Example 1Test it NowOutput: 1. logicalOr() method for true false is true 2. logicalOr() method for false false is false Example 2Output: Enter the number whose table you want to print: 119 Please enter a valid number between 0-20. Example 3Output: Q How many hours are there in a day? Ans: 67 Answer is wrong. 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