Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

Java Catching base exception class only

class Main {
  public static void main(String[] args) {
    try {
      int array[] = new int[10];
      array[10] = 30 / 0;
    } catch (Exception e) {
      System.out.println(e.getMessage());
    }
  }
}
 
PREVIOUS NEXT
Tagged: #Java #Catching #base #exception #class
ADD COMMENT
Topic
Name
6+3 =