public class ArrayIndexOutOfBondExcept { public static void main(String[] args) { try { String[] arr = {"aa1", "aa2", "aa3", "aa4"}; for (int i = 0; i < 10; i++) { System.out.println("Output : " + arr[i]); } }catch (ArrayIndexOutOfBoundsException e) { System.out.println(" *** Error found : arithmatic error found"); e.printStackTrace(); } } }
No comments:
Post a Comment