Non-informative style of assert : Assert « Language Basics « Java

Non-informative style of assert

// Non-informative style of assert
// Compile with: javac -source 1.4
// {JVMArgs: -ea} // Must run with -ea
// {ThrowsException}
// From 'Thinking in Java, 3rd ed.' (c) Bruce Eckel 2002
// See copyright notice in CopyRight.txt.

public class Assert1 {
  public static void main(String[] args) {
    assert false;
} ///:~


Related examples in the same category

1.A Program with Assertions
2.Enabling Assertions from the Command Line: -ea and -da enable and disable assertion in a package subtree or in a class.
3.Handling an Assertion Error
4.Catch assert exception with message
5.Assert with an informative message
6.Using the class loader to enable assertions
7.Class for checking syntax and comments for the assert
8.Assert Util
9.Assertion utility class that assists in validating arguments.
10.An assertion utility just for simple checks.