java.lang.Object
class是所有类的超类。
类对象是类层次结构的根。每个类都有Object作为超类。所有对象(包括数组)都实现此类的方法。
您可以测试一下:
A a = new A();if(a instanceof Object){ System.out.println("Object is superclass of all classes");}
java.lang.Object
类对象是类层次结构的根。每个类都有Object作为超类。所有对象(包括数组)都实现此类的方法。
您可以测试一下:
A a = new A();if(a instanceof Object){ System.out.println("Object is superclass of all classes");}