This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff 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.