Knowledge Check

  1. The enum data type should be used: The enum type allows you to use a defined list of values.​
  2. Switch statement: The switch statement allows you to use cases. If the case matches the value of the switch expression, then a specific code block can run. A default case can also be used when no other cases match.​
  3. The retry statement could be used in the catch statement to rerun the try block: The retry statement will rerun the try block to give the code another opportunity to succeed.