An assertion is an
assert statement containing a boolean expression. An assertion is either enabled or disabled. If the assertion is enabled, execution of the assertion causes evaluation of the boolean expression and an error is reported if the expression evaluates to
false. If the assertion is disabled, execution of the assertion has no effect whatsoever.
It is a compile-time error if Expression1 does not have type
In the second form of the
assert statement, it is a compile-time error if Expression2 is
assert statement that is executed after its class has completed initialization is enabled if and only ...