I have JSDK1.3 version.But compier is giving following error for my assertion program asert.java... "asert.java:10: cannot resolve symbol symbol : class assert location: class asert assert a ;" Here I am pasting the code...
I kept code simple coz , I just wanted to play with assert keyword. Can anybody please lemme know why is it not taking assert keyword? Thanks Veena Thanks Veena [ March 18, 2003: Message edited by: Veena Point ]
SCJP1.4
"Continuous effort - not strength or intelligence - is the key to unlocking our potential."
*Winston Churchill
In 1.3 assert is not a keyword. In your program, assert is a user-defined identifier. The compiler thinks assert is the name of a class (or interface). You are declaring a variable a of class type assert. However the variable a has already been declared as type boolean.
If you download java version 1.4, your code should run fine when compiled with: javac -source "1.4" asert.java and started with: java -ea asert or java -da asert -da = disable assertions -ea = enable assertions
Don't get me started about those stupid light bulbs.