my dog learned polymorphism
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes assert Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "assert" Watch "assert" New topic



Joined: Aug 01, 2003
Posts: 21
is assert a java keyword/reserved ?
Bert Bates

Joined: Oct 14, 2002
Posts: 8886
As of 1.4 'assert' is a keyword. If you want to run pre-1.4 code that happened to use 'assert' as a name, you can tell the compiler to ignore 'assert' as a keyword.

Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
It is sorta covered in the JavaRanch Style Guide.
subject: assert