BAEL-4285

BAEL-4285 A Guide to ArrayStoreException
This commit is contained in:
gupta-ashu01
2020-08-22 16:17:16 +05:30
committed by GitHub
parent 7ba07cc67a
commit 4ceca777b0

View File

@@ -0,0 +1,17 @@
package com.baeldung.array;
public class ArrayStoreExceptionExample {
public static void main(String[] args) {
try {
Object array[] = new String[5];
array[0] = 2;
System.out.println(array[0]);
} catch (ArrayStoreException e) {
e.printStackTrace();
}
}
}