Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Summary of Java Common knowledge points (⑥)-what are the common methods of Object?

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

Protected Object clone () creates and returns a copy of this object.

Boolean equals (Object obj) indicates whether some other object is "equal" to this object.

Protected void finalize () this method is called by the object's garbage collector when the garbage collector determines that no more references to the object exist.

Class getClass () returns the runtime class for this Object.

Int hashCode () returns the hash code value of the object.

Void notify () wakes up a single thread waiting on this object monitor.

Void notifyAll () wakes up all threads waiting on this object monitor.

String toString () returns a string representation of the object.

Void wait () causes the current thread to wait before another thread calls the notify () method or the notifyAll () method of this object.

Void wait (long timeout) causes the current thread to wait before another thread calls the object's notify () method or notifyAll () method, or before the specified amount of time is exceeded.

Void wait (long timeout, int nanos) causes the current thread to wait before another thread calls the object's notify () method or notifyAll () method, or before some other thread interrupts the current thread, or has exceeded an actual amount of time.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report