Assertion keyword in Java
- 17th Aug 2017
- 0
- 4176
- assert keyword in java assertion in java assertion keyword with example how to enable assertion in java how to use assert keyword in java keyword assert with an example when to use assert when to use assertion why do we need assert keyword in java why do we need assertion 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 […]