package pkg1;
public class Class10 {
static Integer[] arrayofINT = { 1, 2, 3, 4 ,5};
public static void main(String[] args) {
if(arrayofINT instanceof Object) {
System.out.println("arrayofINT is an Object !");
}
if(arrayofINT instanceof Integer[]) {
System.out.println("arrayofINT is an Integer[] !");
}
}
}
run:
arrayofINT is an Object !
arrayofINT is an Integer[] !
BUILD SUCCESSFUL (total time: 0 seconds)
No comments:
Post a Comment