Computer Applications
What are logical operators? Give an example of each.
Java Operators
72 Likes
Answer
Logical operators operate only on boolean operands and are used to construct complex decision-making expressions. Some of the logical operators are given below:
| Operator | Symbol |
|---|---|
| Logical AND | && |
| Logical OR | || |
| Logical NOT | ! |
Answered By
40 Likes
Related Questions
We have two variables x and y. Write Java statements to calculate the result of division of y by x and calculate the remainder of the division.
Assign the value of pi (i.e., 3.142) to a variable with requisite data type.
What is an assignment operator? Give an example.
Explain the shorthand assignment operator with an example.