MCQOPTIONS
Saved Bookmarks
| 1. |
Which statement is true about assertions in the Java programming language? |
| A. | Assertion expressions should not contain side effects. |
| B. | Assertion expression values can be any primitive type. |
| C. | Assertions should be used for enforcing preconditions on public methods. |
| D. | An AssertionError thrown as a result of a failed assertion should always be handled by the enclosing method. |
| Answer» B. Assertion expression values can be any primitive type. | |