11th Day of Java Learning

Source: Internet
Author: User

1: Overview of Eclipse use (master) refer to PPT and classroom practice. txt2: Overview of the API (understanding) (1) application programming interface. (2is the Java class that the JDK provides to us to improve programming efficiency. 3: Object Class (Master) (1object is the root class of the class hierarchy, and all classes are directly or indirectly inherited from the object class. (2the construction method of the object class has one, and it is an parameterless construct. That's what we said at the time. The construction of the subclass constructor method by default accesses the parent class is a parameterless construct (3to master the method: A:tostring () returns the string representation of an object, by default the full path of the class+ ' @ ' +the hexadecimal representation of the hash value.            This representation is actually meaningless, and the generic subclass overrides the method. How to rewrite it?The process I have also explained, basically is to request information simple and clear.        But it will eventually be generated automatically. B:equals () compares whether two objects are the same.            By default, the comparison is the same as the address value.            Comparing address values is meaningless, so a generic subclass overrides the method.            Rewrite process, I also explained and analyzed in detail.    But it will eventually be generated automatically. (4to understand the method: A:hashcode () returns the hash value of the object.        is not an actual address value, which can be understood as an address value. B:getclass () Returns the object's bytecode file object, which we will explain in detail c:finalize () for garbage Collection, D:clone () can implement the cloning of an object at an indeterminate time, including data replication of member variables, but it and two cited    There is a difference between pointing to the same object. (5) two points of attention; A: Output an object name directly, but the ToString () method of the object is called by default. B: Face questionThe difference between = = and equals ()?A:==base type: The comparison is whether the value is the same as the reference type: The comparison is whether the address value is the same b:equals () can only compare reference types.                By default, the comparison is the same as the address value. However, we can rewrite the method according to our own needs. 

11th Day of Java Learning

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.