Java中Object对象方法
1.clone() 复制

2.getClass() 获取对象的class

3.equals() 对象值比较,重写equals方法必须重写hashcode,对象的约定,例如不重写,hashMap的kv不一致;

4.hashCode() 对象的hash值

5.tostring() 默认方法是 包名@改对象的hashCode十六进制表示

6.notify() 线程唤起

7.notifyall() 线程全部唤起

8.wait() 线程等待

9.finalize() 基本没啥用,垃圾回收前调用的方法

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-03
  • 2021-12-25
  • 2022-01-16
  • 2021-07-14
猜你喜欢
  • 2021-10-15
  • 2022-12-23
  • 2022-12-23
  • 2021-08-29
  • 2021-05-23
  • 2021-06-26
相关资源
相似解决方案