java-Object-oriented

Source: Internet
Author: User

Three characteristics of object-oriented

Packaging
Encapsulation is the organization of processes and data, access to data only through defined methods.
The purpose of encapsulation is to separate the object's consumer from the designer, and the user does not need to know the details of the behavior implementation, simply using the message from the designer to access the object
Inherited
The new class can obtain properties and behaviors for an existing class (called a superclass, base class, or parent Class), which is called the new class as a derived class (also known as a subclass) of an existing class.
Inheritance can increase the reusability of code and add functionality based on the ability to have a parent class.
Polymorphic
Sends a message to an object, allowing the object to decide for itself what behavior to respond to. Can be understood as a transverse override on a vertical overlay.
The advantage of flexible, abstract, behavioral sharing, and code sharing, which solves the problem of application method with the same name.

java-Object-oriented

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.