Can anyone illustrate the assertion used as indertifier and as keyword with example. I could see many questions in exam. Please, it would be greatful to me.
class Elm { public static void main(String [] args) { int assert=0; } }
When you compile this program you get this erro ====> D:\javapgms>javac Elm.java Elm.java:10: as of release 1.4, 'assert' is a keyword, and may not be used as an identifier (try -source 1.3 or lower to use 'assert' as an identifier) int assert=0; ^ 1 error
Originally posted by Dinesh Tahiliani: i have read k&b, but not able to get, that is why i posted here, so that people on this can help me to understand this concept.