assert can be used as an identifier in java1.3 and lower versions.
but it is not allowed to use it higher of java1.4 versions because it is a keyword.
when i am compiling above code using java1.3
javac -source 1.3 AssertTest1.java it is giving compilation error as
AssertTest.java:6: warning: as of release 1.4, 'assert' is a keyword, and may not be used as an identifier
(use -source 1.4 or higher to use 'assert' as a keyword)
int assert;
^ why?
[ November 06, 2008: Message edited by: Ganeshkumar cheekati ]