Search
 
SCRIPT & CODE EXAMPLE
 

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());
    }
  }
}
Comment

PREVIOUS NEXT
Code Example
Java :: format string precision double java 
Java :: Picked up _JAVA_OPTIONS: -Xmx256M intillij 
Java :: java GLIBC 2 34 missing 
Java :: Java public no-arg constructors 
Java :: csv file data structure java 
Java :: Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0 
Java :: unique numbers in array java 
Java :: viewresolver in spring boot 
Java :: string equlity 
Java :: tinyint in java 
Java :: set integer array value to null java 
Java :: Java Labeled continue Statement Java 
Java :: radio button lambda javafx 
Java :: how to getobject from id in controlp5 
Java :: Zooming an Image using OpenCV in Java 
Java :: Creating strings using the new keyword Java 
Java :: set jtextfield max length 
Java :: jwt token in android studio 
Java :: android studio epoch to localdatetime 
Java :: java how to sort custom objects in descending orde 
Java :: java blocks 
Java :: tipe data c++ 
Java :: how to iterate list in java selenium 
Java :: set default messaging app android manifest 
Java :: aspectj after returning 
Java :: how to find root viewGroop 
Java :: TestNG Data Provider 
Java :: java replace second char of a string 
Java :: list all managed beans in spring 
Java :: sealed class in kotlin example 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =