You probably did not run your program with assertions enabled. To do that, specify either -ea or -enableassertions as a command-line switch. Assertions are disabled by default.
I we are using jdk 1.4 compiler the assertions are disabled by default.. But when we are using jdk 1.5 the assertions are enabled by default. If that was the case no need to enable assertions ...
Is that statement right?? or still what ever compiler we are using we should enable assertions?? Let me know
You're confusing the behavior of the Java compiler (javac) with that of the Java runtime launcher (java). In both 1.4 and 1.5, the runtime launcher will disable assertions by default. However, the 1.4 compiler does not support assertions by default, whereas the 1.5 compiler does. [ November 30, 2007: Message edited by: Kelvin Lim ]
SCJP 5.0
Politics is a circus designed to distract you from what is really going on. So is this tiny ad:
Gift giving made easy with the permaculture playing cards