🖇️Conditionals
💡 Conditionals in Java 👨💻
if (condition) {
// code to execute if condition is true
}if (condition) {
// code to run if condition is true
} else {
// code to run if condition is false
}if (condition1) {
// code to execute if condition1 is true
} else if (condition2) {
// code to execute if condition2 is true
} else {
// default code
}Rules
Boolean operators
if - else and between
The ugly side of if
== and equals
Last updated