Hello,
I have the following problem:
Question 5.33 (chapter control flow, exception handling
and assertions)of the Programmers Guide To
Java (Mughal,Rasmussen) states that the following command:
java -ea -da:com... net.example.LaunchTranslator is said to enable the assertions for the classes
dot.com.Boom and net.example.LaunchTranslator.
And it explains that: �The command line enables assertions for
all non-system classes, except for those in the com package or
one of its subpackages. Assertions are not enabled for the system
classes in (b) and (e)� (where (b) and (e) are respectively java.lang.String and java.lang.AssertionError.
In Kathy and Bert�s guide on page 263 in the table 4-4
it states that the command
java �ea �dsa enables enables assertions in general, but disables assertions
in system classes.
Since assertions are disabled at runtime by default
and �ea enables assertions in general, why does the
Programmer�s guide to Java say that �Assertions are
not enabled for the system classes...�
Who's right?
Can anyone help? Thanks,
Gian Franco