Multiple choice technology programming languages

Assertions are used to enforce all but which of the following?

  1. Preconditions

  2. Postconditions

  3. Exceptions

  4. Class invariants

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Assertions in Java are used to verify assumptions during development for preconditions, postconditions, and class invariants. They are NOT designed for handling exceptions - try-catch blocks and exception handling mechanisms serve that purpose.