assert expression1;
assert expression1 : expression2;
ParameterDetailsexpression1The assertion statement throws an AssertionError if this expression evaluates to false.expression2Optional. When used, AssertionErrors thrown by the assert statement have this message.
By default, assertions ...