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