Java--java.lang.object

Source: Internet
Author: User

1.wait and Notify ()/notifyall ()

Object locks must be obtained before calling Wait () and notify (), typically used in synchronized. After the wait () method is called, the thread releases the lock on the object and must regain the object lock

2.clone (), "Shadow copy" and "Deep copy"

Shallow copy and deep copy concepts:

  Shallow copy: all member properties of the copied object have the same value as the original object, and all references to other objects still point to the original object. In other words, shallow copy replicates only the object being considered, not the object it refers to. (The concept is not good to understand, please follow the example below to understand)

  deep Copy: all the variables of the copied object contain the same values as the original object, removing the variables that refer to other objects. Variables that refer to other objects will point to new objects that have been copied, rather than to the original referenced objects. In other words, deep copy objects referenced by the object to be copied are copied over

  

3.registerNatives () Function: The method of mapping the methods in C/C + + to the native method in Java to realize the decoupling of the method name

Java--java.lang.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.