Assertion keyword in Java

An assert is a keyword in Java which enables us to test our assumptions about our program. Assert will throw exception, If its expression evaluates to false and do nothing if it’s true. Syntax : assert Expression1 ; Where, Expression1 is a boolean expression. When the system runs the assertion, it evaluates Expression1 and if […]

Share this article on