Multiple choice technology programming languages

Which of the following are command-line switches used to enable assertions in non-system classes?

  1. -ea

  2. -ae

  3. -aon

  4. -assertionsenable

  5. -enableassertions

Reveal answer Fill a bubble to check yourself
A,E Correct answer
Explanation

Java provides two valid command-line switches to enable assertions: -ea (short form) and -enableassertions (long form). Options like -ae, -aon, and -assertionsenable are invalid.