To compile a program with assertions, you must add the command line
option
-source 1.4 to
javac.
public class CompileAssert {
public static void main(String[] args) {
assert args.length > 0;
}
}
This is the command to compile the program:
>javac -source 1.4 CompileAssert.java
Post a comment