/** * Throw and rethrow with no catch. * All program must catch somewhere **/ public class Crash1b { private static void faulty() throws ArrayIndexOutOfBoundsException { int[] a = { 10, 20, 30, 40, 50 }; for (int i = 0; i <= 10; i++) { System.out.println(a[i]); } } public static void main(String[] args) throws ArrayIndexOutOfBoundsException { faulty(); System.out.println("Done printing the array!"); } }