Debug.assert

Overview | Methods | This Package | All Packages

Debug.assert

Checks for a condition and displays a message if the condition is false.

Syntax

public static void assert( boolean condition, String message )

Parameters

condition

The condition to check.

message

A message to display if the condition parameter evaluates to false.

Remarks

It is good practice to guard your coding assumptions with the use of asserts. This method will be omitted from your code unless you have the DEBUG conditional compile switch set.