OSDN Git Service

Initial revision
[pf3gnuchains/gcc-fork.git] / libjava / classpath / testsuite / java.lang / ExceptionTest.java
1 public class ExceptionTest 
2 {
3   static int foo() throws ArrayIndexOutOfBoundsException {
4     int f[] = new int[10];
5
6     return f[26]; 
7   }
8
9   public static void main (String args[]) {
10     int f;
11
12     try {
13       f = foo();
14     }
15     catch (ArrayIndexOutOfBoundsException e) {
16       System.out.println("PASSED: " + e.toString());
17     } catch (Exception e) {
18       System.out.println("FAILED: " + e.toString());
19     }
20   }
21 }