public class Test{
public static void main(String args[]){
try{
int array[] = null;
array[0] = 10;
}catch(NullPointerException e){
System.err.println("NullPointerException");
}catch(RuntimeException e){
System.err.println("RuntimeException");
}catch(Exception e){
System.err.println("Exception");
}
}
}
|