Home > Java > javaTutorial > What are the common methods of Object class in Java?

What are the common methods of Object class in Java?

王林
Release: 2023-04-20 23:25:06
forward
846 people have browsed it

What are the public methods of Object?

  1. clone() Create Bin Return a copy of this object

  2. equals() Determine

  3. getclass() returns the running class of object

  4. hashcode() returns the hash code value of the object

  5. ##notify() wakes up A single process waiting for an object listener

  6. notifyAll() wakes up all processes that are waiting for an object listener

  7. wait() causes the current thread to wait , until another thread calls the object's notify() method or notifyAll() method

  8. ##toString() returns the string representation of this object
  9. finalize() The garbage collector calls this method when the garbage collection determines that the object is not needed

The above is the detailed content of What are the common methods of Object class in Java?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:yisu.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template