Update ArrayStoreExceptionExample.java

This commit is contained in:
gupta-ashu01
2020-08-30 14:19:34 +05:30
committed by GitHub
parent ce7cec255d
commit 05b59bdc91

View File

@@ -7,9 +7,8 @@ public class ArrayStoreExceptionExample {
try { try {
Object array[] = new String[5]; Object array[] = new String[5];
array[0] = 2; array[0] = 2;
System.out.println(array[0]);
} catch (ArrayStoreException e) { } catch (ArrayStoreException e) {
e.printStackTrace(); // handle the exception
} }
} }