| 1 | // Program to show ArrayOutOfBoundsException Error handling - |
| 2 | package arrayOutOfBounds; |
| 3 | public 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 | } |
nothing calls this directly
no outgoing calls
no test coverage detected