Hi:
I have jdk 1.4.1 on my machine. I am trying this basic trial program to play with assert.
package assertions;
public class AssertTest
{
public static void main(
String []args)
{
boolean x=true;
assert (x);
}
}
I get the following compilation error:
AssertTest.java:11: warning: as of release 1.4, assert is a keyword, and may no
be used as an identifier
assert (x);
^
AssertTest.java:11: cannot resolve symbol
symbol : method assert (boolean)
location: class assertions.AssertTest
assert (x);
^
1 error
1 warning
------------
Can you pls tell me what I need to do to make this program compile?
Thanks in advance for the help.