Module java.base
Package java.lang

Class AssertionError

java.lang.Object
java.lang.Throwable
java.lang.Error
java.lang.AssertionError
All Implemented Interfaces:
Serializable

public class AssertionError extends Error
Thrown to indicate that an assertion has failed.

The seven one-argument public constructors provided by this class ensure that the assertion error returned by the invocation:

     new AssertionError(expression)
 
has as its detail message the string conversion of expression (as defined in section 5.1.11 of The Java Language Specification), regardless of the type of expression.
Since:
1.4
See Also: