| Author |
Assertions.
|
venkatesh rajmendram
Ranch Hand
Joined: Dec 05, 2000
Posts: 130
|
|
Hi, What is the difference between java -ea and java -dsa First one says enable assertions at runtime for all classes except for the system calsses second one says enable assertions in general, but disable in system classes. Any clarifications.... Also what type of question can be asked in exam ..any tips...? Thanks Venkatesh
|
SCJP 1.4, SCWCD<p>Ours is a world where people don't know what they want and are willing to go through hell to get it.<br /> - Don Marquis
|
 |
sanjana narayanan
Ranch Hand
Joined: Nov 25, 2003
Posts: 142
|
|
Originally posted by venkatesh rajmendram: Hi, What is the difference between java -ea and java -dsa First one says enable assertions at runtime for all classes except for the system calsses second one says enable assertions in general, but disable in system classes. Any clarifications.... Also what type of question can be asked in exam ..any tips...? Thanks Venkatesh
java -ea enable assertions at runtime for all classes except for the system calsses . This is true java -dsa We are disabling the assertions for the system classes. By default the assertions are disabled for all classes at runtime. So we have to explicity give -ea to enable the assertions. Hope it is clear. -Sanjana
|
 |
venkatesh rajmendram
Ranch Hand
Joined: Dec 05, 2000
Posts: 130
|
|
Oh!! I misstyped it , it is supposed to be java -ea -dsa and java -ea they both mean the same...I guess ...any clarification is appreciable Thanks Venkatesh
|
 |
Marlene Miller
Ranch Hand
Joined: Mar 05, 2003
Posts: 1391
|
|
Hi Venkatesh, �ea �dsa and �ea mean the same thing. Here are some insights into the assertion switches: 1. To make it easy to turn on asserts in all classes except for system classes, -ea does not apply to system classes. 2. Since �ea does not apply to system classes, a separate switch is provided to enable asserts in all system classes. �esa 3. �For symmetry, a corresponding switch is provided to disable asserts in all system classes, though it is not clear that there exists a use for this switch.� -dsa http://java.sun.com/docs/books/jls/assert-spec.html Appendix II [ December 23, 2003: Message edited by: Marlene Miller ]
|
 |
 |
|
|
subject: Assertions.
|
|
|