You have to store the result of the conditions and then check it inside.
boolean atrue = a == 0;
boolean btrue = b == 0;
boolean ctrue = c == 0;
if(atrue || btrue || ctrue)
{
if (atrue) {
..
}
if (btrue) {
..
}
}
More Related Contents:
- If-else One line statement (with string and integer) [closed]
- how to make an if statement then send a message [closed]
- Why does the if statement “if(1)” give error in Java but it holds true in C++?
- Result from printing statement and if statement differ
- How to count the results in a for loop?
- Conditional Statement on Java7
- Will my program execute “else” even if it executed my “if”?
- I keep getting java.lang.ArrayIndexOutOfBoundsException: 5! How do I fix this? [closed]
- Performance of java if-else with return statement [duplicate]
- ArrayList, Loop and requisite if can not work that i want – Java 11
- What is the relative performance difference of if/else versus switch statement in Java?
- How can I check if an app running on Android?
- Using switch statement with a range of value in each case?
- Test if a string contains any of the strings from an array
- Is there a difference in removing the curly braces from If statements in java
- Java String – See if a string contains only numbers and not letters
- What is better: multiple “if” statements or one “if” with multiple conditions?
- How to do if-else in Thymeleaf?
- Why doesn’t my compare work between char and int in Java?
- Which is more effective: if (null == variable) or if (variable == null)? [duplicate]
- Using variables outside of an if-statement
- Java: If vs. Switch
- variable access outside of if statement
- How can a Java variable be different from itself?
- Refactoring if/else logic
- How to remove large if-else-if chain [duplicate]
- How is String in switch statement more efficient than corresponding if-else statement?
- Nested if-else behaviour without braces
- If-else working, switch not [duplicate]
- is it possible to check if a char matches a list of possibilities?