201671010138 2016-2017-2 "Java Programming" learning experience

Source: Internet
Author: User

After inheriting, because Java does not support multiple inheritance, a class can inherit only one superclass. For

To overcome the shortcomings of inheritance, this week we further learned the interface, a class can implement one or more

Interface. But an interface is not a class but a set of requirements descriptions for a class, consisting of constants and a set of abstract methods

We learn from the basic concepts of interfaces and how they are defined, but some concepts of Java

And the definition of the abstract is difficult to understand, if the combination of instances is slightly easier, but for themselves to write the whole process

It is difficult to order again. Can read a program, and then to master the program, and then can write their own class

, there is a big difference between the programs. Now the progress of learning is only able to read the entire program

It is not yet fully applied.

The learning callback is a common programming pattern in which a specific

Actions that should be taken when an event occurs. And then we did the corresponding callback experiment, which is the goal

The most interesting of the previous experiments, there will be a human-computer interaction window, there will be a bell hint.

Summary of differences between shallow and deep copies in the experimental content:

< Span style= "font-family: italics" >  shallow copy means when copying an object, The variable for the base data type will be re-copied, < Span style= "font-family: italics" > and for the citation

A variable of type is simply a copy of the reference, and no copy is made to the object to which the reference refers. and deep copy

Is< Span style= "font-family: italics" > < Span style= "font-family: italics" > < Span style= "font-family: italics" > in When you copy an object, the object that the reference points to is also copied. The difference is whether it's right  

< Span style= "font-family: italics" > < Span style= "font-family: italics" >

201671010138 2016-2017-2 "Java Programming" learning experience

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.