This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
It's a little more tricky than simply, it was added in 1.4. For example, the following compiles under Java 1.4 without error:
So, it is a keyword, but it can be used as if it weren't, for backward compatibility. Now, if you want to use assertions, you have to compile with the flag "-source 1.4" and run the JVM with -ea (enableassertions). Otherwise, the following would not compile:
Hope this helps, jdmaddison
Joined: Jan 07, 2005
I think JD got it right! Thank you v. m. everyone.