Advertisements
Advertisements
Question
Explain the following with one example.
Logical operator
Answer in Brief
Solution
Java's logical operators (&&, ||, !) return true or false based on the outcome of expressions.
Example:
Logical operators | Symbol | Example |
AND | && |
|
OR | || |
|
NOT | ! |
|
shaalaa.com
Is there an error in this question or solution?
Chapter 1.04: Operators in Java - EXERCISES [Page 44]