public class ThrowsTestProg {
public static void main (String [] args) {
ThrowsTest tt = new ThrowsTest ();
tt.printA ();
}
public static class ThrowsTest {
ThrowsTest () throws ArrayIndexOutOfBoundsException {
System.out.println ("B");
int i = 5/0;
}
void printA () throws ArrayIndexOutOfBoundsException {
System.out.println ("A");
}
}
}