摘要: 下面介绍Java面试中常见的对象加载及创建题目。 1、Java对象初始化顺序 先看一下如下笔试题目: class Parent { public static int a = 2; public int b = 3; // 2 { System.out.println("this is anonym 阅读全文
posted @ 2020-04-26 10:45 归去来兮辞 阅读(339) 评论(0) 推荐(0) 编辑
摘要: Java的Object是所有引用类型的父类,定义的方法按照用途可以分为以下几种: (1)构造函数 (2)hashCode() 和 equals() 函数用来判断对象是否相同 (3)wait()、wait(long)、wait(long,int)、notify()、notifyAll() 线程等待和唤 阅读全文
posted @ 2020-04-26 07:36 归去来兮辞 阅读(707) 评论(0) 推荐(0) 编辑