本帖最后由 陈琦 于 2012-10-30 11:56 编辑
public class TestFiled {
public static void main(String[] args) {
String s [] = new String[] {"1","2","4","4"};
Object b = (Object)s; //这里不是向上转型的话,那是什么??
Object o = new Object();
System.out.println(b); //打印结果::[Ljava.lang.String;@70a0afab 为什么打印的不是Object??
System.out.println(o); //打印结果::java.lang.Object@456d3d51
}
} |