private static void fansheArray(Object obj1){
Class obj2= obj1.getClass();
if(obj2.isArray()){
int len=0;
len=Array.getLength(obj2);
for (int i = 0; i <len; i++) {
System.out.println(Array.get(obj2, i));
}
}else{System.out.println(obj2);}
}为什么老是打印不了我想要的数组呢 |
|