try { Array array = new Array( -2 ); } catch ( IllegalArgumentException exception ) { System.out.println( "Caught " + exception ); }