![]() |
The Java Developers Almanac 1.4Order this book from Amazon. |
e103. Compiling a Program with AssertionsTo 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
e105. Handling an Assertion Error
© 2002 Addison-Wesley. |