摘要: Demo1:子类实例化对象之前会自动先实例化父类对象,调用了父类无参构造方法 class A{ public A() { System.out.println("A、A类的构造方法"); } } class B extends A{ public B() { System.out.println(" 阅读全文
posted @ 2022-01-04 10:07 大道至简、 阅读(40) 评论(0) 推荐(0)
摘要: public static void main(String[] args) { Integer a = 1000; Integer b = 1000; System.out.println(a==b); //false } 阅读全文
posted @ 2022-01-04 10:01 大道至简、 阅读(46) 评论(0) 推荐(0)