MCPcopy Create free account
hub / github.com/PrajaktaSathe/Java / ArrayOutOfBounds

Class ArrayOutOfBounds

Programs/arrayOutOfBounds.java:3–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1// Program to show ArrayOutOfBoundsException Error handling -
2package arrayOutOfBounds;
3public class ArrayOutOfBounds {
4
5 public static void main(String[] args) {
6 int arr[] = new int[20];
7 try {
8 arr[22] = 60;
9 }
10 catch(ArrayIndexOutOfBoundsException e) {
11 System.out.println("Enception occured");
12 }
13 System.out.println("Quit");
14 }
15}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected