Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Second form of Assertion
The second for of assertion takes another expression as an argument.
The syntax is,
assert expression1 : expression2;
where expression1 is the condition and must evaluate to true at runtime.
This statement is equivalent to