write a program of java to demonstrate the use of the logical operators
Answers
Answered by
2
Answer:
Example: a = 10, b = 20, c = 20 condition1: a < b condition2: b == c if(condition1 && condition2) d = a+b+c // Since both the conditions are true d = 50. 'Logical OR' Operator(||): This operator returns true when one of the two conditions under consideration are satisfied or are true.
Answered by
1
Answer:
Example: a = 10, b = 20, c = 20 condition1: a < b condition2: b == c if(condition1 && condition2) d = a+b+c // Since both the conditions are true d = 50. 'Logical OR' Operator(||): This operator returns true when one of the two conditions under consideration are satisfied or are true.
I hope it will help you....
Similar questions