Java OCA OCP Practice Question 1024

Question

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

  • A. Pre-conditions
  • B. Post-conditions
  • C. Exceptions
  • D. Class invariants


C.

Note

Assertions do not enforce exceptions in any way.

Assertions do use exceptions to ensure that code is used correctly.




PreviousNext

Related