Introduction to the object thinking in Java Chapter I.

Source: Internet
Author: User

1.1 Abstract Process

1. The complexity of people's ability to solve problems directly depends on the type and quality of abstraction.

1.2 Each object has an interface

1.3 Service for each object

1.4 The specific implementation that is hidden

1. Program Ape is divided into: Class creator and client program ape

The difference between the two is that the class creator is the developer of the write-down and wrapper implementations, while the client-side program Ape is primarily developed using the classes written by the class creator, and the roles of the two are integrated in the general developer's view, as in Java development, and then used by itself.

  

2.Java access Rights control

public,private,protected;

Java also has a default package access that, under the same package, can access members of other classes, but not under the same package, as members of these classes are like private access types.

1.5 multiplexing Specific classes

The combination that will be mentioned later

  

1.6 Inheritance <is-a>

1.7 interchangeable objects associated with polymorphism

1. The upward transformation leads to: static binding and dynamic binding

2. Static binding: Determine the specific method of invocation at compile time, not at run time;

3. Dynamic binding: In the compilation period with a small piece of code instead of an absolute address call, this code can at run time to calculate the need to invoke the specific method of the address, so that the different objects can be implemented in different ways to achieve the purpose;

Dynamic binding is the core of the upward transformation and the main core of the factory pattern implementation.

1.8 Single-root succession mechanism

All classes inherit from a single base class Java---<Object>

1.9 Container

such as COLLECTION,MAP, etc.

  

  

Introduction to the object thinking in Java Chapter I.

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.