Java Reflection Readiness Knowledge

Source: Internet
Author: User

All methods of the object class

  1. Object Clone public Object Clone () throws Clonenotsupportedexception; the class where the cloned object resides must implement the Java.lang.Cloneable interface, and the subclass only needs to continue invoking the object's Clone method to implement
  2. Object Output Public String toString () Direct Output object is the default call
  3. Object Compare public Boolean equals (Object obj) when the set collection is saved, it relies on hashcode () and Equals () to determine whether the object is duplicates
  4. Gets the object's hash code public int hashcode () unique encoding (identity) for each object: the comparison will first determine if the encoding is the same, and then in the call Equalss method comparison
  5. Gets the class object public class<?> getclass () The object's reflection operation through an already instantiated object
  6. Thread waits for public void wait () throws interceptorexception; When executed to this code, the thread waits for execution until notify (), or the Notifyall () method wakes up  
  7. Wake the first waiting thread public void notify ();
  8. Wake all waiting Threads public void notifyall ();
  9. Release public void Finalize () throws throwable before garbage collection; Default call when garbage garbage is recycled using GC

Java Reflection Readiness Knowledge

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.