9496 Lynk's site for housing knowledge and information for the team.
if
statements let us control the flow of the program.
if (x == y){ //"if" statements decide to do something based on if something is true or false.
System.out.println("x equals y");
} else if (x > y){ //"else if" allows us to check another statement if the first statement was false
System.out.println("x greater than y");
} else { //"else" lets us to do things when the if statement is false
System.out.println("x less than y");
}