We will now spend the next several lessons covering various Logic concepts you need to understand in Apex. We get this Logic section started by discussing If Else.
In this lesson, we cover Comparison Operators. Expressions can be joined to one another with operators to create compound expressions.
Resource:
Expression Operators -
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_expressions_operators_understanding.htm
In this lesson, we create a Ternary operator example.
Resource:
Expression Operators -
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_expressions_operators_understanding.htm
Apex provides a switch statement that tests whether an expression matches one of several values and branches accordingly.
Resource:
Switch Statements - https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_switch.htm