/*
 * @topic T11387 Exception demo IX
 * @brief using IndexOutOfBoundsException (unchecked exception)
*/

package week08exceptions2;

public class AppMain {

    public static void main(String[] args) {
        //generateRunTimeException();
        methodThatAsserts( 0 );
    }
    
    public static void generateRunTimeException()
    {
        throw new IndexOutOfBoundsException();
    }
    
    public static void methodThatAsserts( int val )
    {
        assert ( val > 1 ) : "( val > 1 )";
        //if ( !(val > 1) ) {
        //    throw new java.lang.AssertionError("( val > 1 )");
        //}
    }
}