1
1
mirror of https://github.com/github/semantic.git synced 2024-12-11 08:45:48 +03:00
semantic/test/fixtures/java/corpus/try-catches.java
2018-06-01 14:09:56 -07:00

20 lines
569 B
Java

class Example2{
public static void main(String args[]){
try{
int a[]=new int[7];
a[4]=30/0;
System.out.println("First print statement in try block");
}
catch(ArithmeticException e){
System.out.println("Warning: ArithmeticException");
}
catch(ArrayIndexOutOfBoundsException e){
System.out.println("Warning: ArrayIndexOutOfBoundsException");
}
catch(Exception e){
System.out.println("Warning: Some Other exception");
}
System.out.println("Out of try-catch block...");
}
}