# Conditional Logic

Conditional Logic: If, Multiple Conditions, Switch, Switch Expressions.

Updated: November 16, 2026

1. [If](https://www.ask-codey.com/lessons/conditional-logic-if) (Novice): Use if, if-else and if-else if-else to run a block of code only when a condition is true, or to pick one block out of several.
2. [Multiple Conditions](https://www.ask-codey.com/lessons/conditional-logic-multiple-conditions) (Apprentice): Combine conditions with && (and) and || (or), and use parentheses to group them so the if means what you intend.
3. [Switch](https://www.ask-codey.com/lessons/conditional-logic-switch) (Apprentice): The switch statement provides a more readable and efficient way to execute different code blocks based on the value of a single variable.
4. [Switch Expressions](https://www.ask-codey.com/lessons/conditional-logic-switch-expressions) (Apprentice): Java's arrow switch never falls through, lets one case match several values, and can give back a value you store in a variable, with no break to forget.

Source: https://www.ask-codey.com/courses/java-full-stack-bootcamp/topics/conditional-logic
