java-Object-oriented

Source: Internet
Author: User

java-Object-oriented

1. Programming Ideas

1. Process oriented

Event-centric

Cons: Difficult to maintain, poor reusability

2. Object-oriented

Take things as the center

Advantages: Easy maintenance, good reusability

2. Basic

1. Class

Collectively, the same class of things

A carrier for encapsulating the attributes and behavior of a class of things

Function: Define the class first and then generate the object from the class

    

2. Object

Object is an instance of a class

Entities in existence: static characteristics (attributes), dynamic features (methods)

3. Characteristics

1. Encapsulation defines the class (the property of the class corresponds to the property of the Thing) (the method of the class corresponds to the behavior of the thing)

2. Inheriting subclasses can automatically inherit members exposed by the parent class

3. Members of polymorphic classes have multiple forms

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.