As of Java version 1.4, assertion statements are compiled by default.
as of Java 1.4 you must add the argument –source 1.4 to the command line if you want the
compiler to compile assertion statements.
Rajeev Trikha wrote:In K&B ch4/q19 (SCJP 5) there is a statement
19. Which two of the following statements are true? (Choose two.)
A. If assertions are compiled into a source file, and if no flags are included at runtime,
assertions will execute by default.
B. As of Java version 1.4, assertion statements are compiled by default.
C. With the proper use of runtime arguments, it is possible to instruct the VM to disable assertions for a certain class, and to enable assertions for a certain package, at the same time.
D. The following are all valid runtime assertion flags:
-ea, -esa, -dsa, -enableassertions,
E. When evaluating command-line arguments, the VM gives –ea flags precedence over –da flags.