About Question enthuware.ocpjp.v7.2.1322 :
Posted: Tue Oct 30, 2012 6:03 am
Q: Assertions require changes at the JVM level.
but it is marked as a correct answer?No change is required in the JVM for supporting assertions.
Q: Assertions can be enabled or disabled at runtime.
but it is not marked as a correct answer?By using the switches, -ea and -da or -enableassertions or -disableassertions
Q: Code that uses Assertions cannot be run on version below 1.4
but is not marked as a correct answer?Because of the 'assertion' keyword.
Q: Code written for JDK version 1.3 cannot be compiled under JDK version 1.4
but it is marked as a correct answer?It can be compiled by using -source flag: javac -source 1.3 classname.java