答:
一.所有方法
1. getClass()
2. hashCode()
3. equals()
4. toString()
5. wait()...
6. notify()
7. notifyAll()
二. 各個方法作用:
方法摘要
boolean equals(Object obj) 指示某個其他對象是否與此對象“相等”。
ClassgetClass() 返回一個對象的運行時類。
int hashCode() 返回該對象的哈希碼值。
void notify() 喚醒在此對象監視器上等待的單個線程。
void notifyAll() 喚醒在此對象監視器上等待的所有線程。
String toString() 返回該對象的字符串表示。
void wait() 導致當前的線程等待,直到其他線程調用此對象的 notify() 方法或 notifyAll() 方法。
void wait(long timeout) 導致當前的線程等待,直到其他線程調用此對象的 notify() 方法或 notifyAll() 方法,或者超過指定的時間量。
void wait(long timeout, int nanos) 導致當前的線程等待,直到其他線程調用此對象的 notify()