Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

public class Main {
    public static void main(String args[]) {
        try {

            int c[] = { 1 };
            c[42] = 99;
        } catch (ArrayIndexOutOfBoundsException e) {
            System.out.println("array index oob: " + e);
            e.printStackTrace();
        } catch (ArithmeticException e) {
            System.out.println("div by 0: " + e);
            e.printStackTrace();
        }
    }
}