changing package

changing package
This commit is contained in:
gupta-ashu01 2020-08-24 11:07:38 +05:30 committed by GitHub
parent cec243af0d
commit da1d54699f
1 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,17 @@
package com.baeldung.array.arraystoreexception;
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();
}
}
}