(b) Rewrite the following condition without using logical operators: if (a>b || a>c) System.out.println(a);
Home
/
(b) Rewrite the following condition without using logical operators: if (a>b || a>c) System.out.println(a);
(b) Rewrite the following condition without using logical operators: if (a>b || a>c) System.out.println(a);
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Answer:
The logical OR operator ( || ) returns the boolean value true if either or both operands is true and returns false otherwise. The operands are implicitly converted to type bool before evaluation, and the result is of type bool . Logical OR has left-to-right associativity.