Express the following if statement using logical NOT operator.
if(x%2==0)
System.out.println(“Even No.”);
Answers
Answered by
7
Answer:
if(x%2!=0)
System.out.println("Not Even number");
About Logical NOT Operator
- It has the highest precedence in logical operator
Some more Logical operators:-
- Logical AND operator
- Logical OR operator
Similar questions