Update ArrayStoreExceptionExample.java
This commit is contained in:
parent
765629be47
commit
71b9fd959a
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user