can you have an if and a for statement in java code example
Example 1: if statement java
int x = 3;
if (x == 3) {
// block of code to be executed if the condition is true
}
Example 2: java if a or b
if(a || b){
doSomething();
}
/*
For if queries: || (OR), && (AND), == (EQUALS), != (DOES NOT EQUAL)
< (LESS THAN), > (GREATER THAN), <= (LESS THAN OR EQUAL TO),
>= (GREATER THAN OR EQUAL TO)
*/