?

AP® Computer Science A

Free Version

Upgrade subject to access all content

Moderate

Assert Statement Usage

APCSA-YYVZTN

Which of the following are reasons for using the assert statement in java?

I. To make sure that a method’s postconditions are satisfied
II. To make sure that a private method’s preconditions are satisfied
III. To make sure that an object’s state is a certain condition

A

I only.

B

II only.

C

III only.

D

I and II only.

E

I, II, and III.