I was perusing a
Java 1.4 certification book in the bookstore. I saw this assertion question, but I never looked up the answer and explanations. I might know two of the answers just based on educated guesses. If you all could give me a better understanding, it would be greatly appreciated.
All I know about assertions is that it is new in Java 1.4 and that you have to use "javac -source 1.4" and "java -ea".
Which three statements are true? (Choose three)
A. Assertion checking can be selectively enabled or disabled on a per-package basis, but not a per-class basis.
B. Assertion checking is typically enabled when a program is deployed.
C. Assertion checking can be selectively enabled or disabled on both a per-package basis and a per-class basis.
D. It is never appropriate to write code to handle failure of an assert statement.
E. Assertion checking is typically enabled during program development and
testing.