|expression1||The assertion statement throws an |
|expression2||Optional. When used, |
By default, assertions are disabled at runtime.
To enable assertions, you must run java with
java -ea com.example.AssertionExample
Assertions are statements that will throw an error if their expression evaluates to
false. Assertions should only be used to test code; they should never be used in production.