Update ArrayStoreExceptionExample.java
This commit is contained in:
parent
765629be47
commit
71b9fd959a
|
@ -7,9 +7,8 @@ public class ArrayStoreExceptionExample {
|
|||
try {
|
||||
Object array[] = new String[5];
|
||||
array[0] = 2;
|
||||
System.out.println(array[0]);
|
||||
} catch (ArrayStoreException e) {
|
||||
e.printStackTrace();
|
||||
// handle the exception
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue