Java 2 SDK for Solaris Developer's Guide

Assertion Facility

An assertion facility has been added to the Java 2 Platform. Assertions are boolean expressions that the programmer believes to be true concerning the state of a computer program. For example, after sorting a list, the programmer might assert that the list is in ascending order. Evaluating assertions at runtime to confirm their validity is one of the most powerful tools for improving code quality, as it quickly uncovers the programmer's misconceptions concerning a program's behavior. For more information, see “Assertion Facility” in Java 2 SDK for Solaris Developer's Guide.