Specifications

Sun Services
Java™ Programming Language
Module 8, slide 25 of 25
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision F
Controlling Runtime Evaluation of Assertions
If assertion checking is disabled, the code runs as fast as
if the check was never there.
Assertion checks are disabled by default. Enable
assertions with the following commands:
java -enableassertions MyProgram
or:
java -ea MyProgram
Assertion checking can be controlled on class, package,
and package hierarchy bases, see:
docs/guide/language/assert.html