Object

Object - Java 17 Doc

Method

equals(obj) 默认比较地址是否相同 return (this == obj)

int hashCode() 返回对象的 hash code 值

String toString()
默认输出的是 类名@哈希码

boolean equals(Object obj)

protected native Object clone() throws CloneNotSupportedException;
重写时,必须 impl 一个 Cloneable ,代表可被复制
浅拷贝,复制了一个新的对象,但引用类型的成员变量只复制了地址
重写代码: return super.clone();

final method:

final Class<?> getClass() 返回此 Object 的 runtime class

线程的等待和唤醒:

wait()

wait(long timeoutMillis)

wait(long timeoutMillis, int nanos)

notify()

notifyAll()