Use Java to implement Object-Oriented Programming-java learning notes, object-oriented programming-java

Source: Internet
Author: User

Use Java to implement Object-Oriented Programming-java learning notes, object-oriented programming-java

Use Java to implement Object-Oriented Programming

Object oriented program)

All objects: everything in the world can be used as a type to help us solve the problems that need to be solved.

Programs are a collection of objects, and they send information to tell each other what to do: When we need to use a type to instance an object to solve the problem, it is like to say to that type, I want to reference a feature of yours, and then he says yes.

You need to instance a my object (some do not need it because it has already been provided ).

Object-Oriented Programming is designed and developed using "realistic simulation methods.

The process of object-oriented design is an abstract process. Based on business needs, we focus on business-related attributes and behaviors, ignoring unnecessary attributes and behaviors, objects in the real world abstract the objects in software development ".

Class: Abstract by multiple objects. It refers to a type of real life.

Object: a specific instance of a class. It is a one-to-one relationship and a ing of the real world in a program.

Constant: in java, final is used to declare that this is a constant. It indicates that this is final and can be referenced but cannot be modified. The constant name specification is capitalized.

1 public final class Test {2 // The class modified by finla cannot be inherited but can be inherited by instance 3 final int NUMBER = 0; // This is a constant 4 final void method () {} // This is a final modifier method. 5 // The final modifier method cannot be overwritten but can be referenced. 6}

 

Update again... I just got started with the code for one and a half years. I have a lot of knowledge to learn or be incorrect. If the programmer sees something wrong, I still have a better understanding. Hope you can give me some advice. Don't confuse others with the incorrect learning materials.

 

 

 

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.