If statement

If statement — allows you to execute a block of code only if a specific condition evaluates to true.

if (condition) {
    // Code to execute if the condition is true
}
int age = 20;
if (age >= 18) {
    System.out.println("You are an adult.");
}

If statement — Structure map

Clickable & Draggable!

If statement — Related pages: