Java Class-object

Source: Internet
Author: User

The Object class is the parent class for all Java classes, and all classes inherit this class by default, and do not need to display the specified extends.

The class contains the following methods:
    1. public final native class<?> getclass ()
    2. public Final native void notify ()
    3. public final native void Notifyall () /span>
    4. public final native void wait (long timeout) throws Interruptedexception
    5. public final void Wait (long timeout, int nanos) throws interruptedexception
    6. public native int hashcode ()
    7. public boolean equals (Object obj)
    8. protected native Object clone () throws Clonenotsupportedexception
    9. protected Void Finalize () throws Throwable

Some of these methods are declared final, which means they cannot be overwritten. In practical programming, we may overwrite other methods, such as hashcode and equal, as needed.

1) GetClass

-Gets the class instance of the run-time object

2) Wait3) Notify4) Equal5) Hashcode6) Clone7) Fanalize

Java Class-object

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.