Java Object-oriented programming

Source: Internet
Author: User

What is object-oriented programming? Object-oriented programming is a relatively new way of programming, he is a process-oriented upgrade, the process-oriented and object-oriented differences are only a different style. For example: process-oriented language vb/c the instructions that he compiled to invoke the platform are the same. Object-oriented language java/c++ the same is true of the platform directives they eventually form. Whether it's a process-oriented or object-oriented language, the final platform they turn into is that the machine code is consistent, without a bit of distinction. 8.1 is shown below:

650) this.width=650; "src=" Http://img.mp.itc.cn/upload/20160905/a1c283019ea344aea9f2f461d2c9b091.jpg "style=" border:0px;margin:0px;padding:0px;font-size:0px; "/>

Figure 8.1

Why do you just say it differently? For example, the Japanese communicate with the Chinese people have to learn Chinese, Americans also communicate with the Chinese people still have to learn Chinese, but learning Chinese is more difficult. Then we all agree to learn English, after learning to communicate, in fact, the form of performance is different. The code is written in a different format, and at the end of the order it is the command.

For example, there is a A001 command on the platform, assuming you can control his shutdown, and then the C and VB language he calls a command when he shuts down, the command turns to the A001 call. and Java and C + + is an object-oriented language, he will convert, after conversion, or send A001 to shut down the machine. It doesn't matter what language it is, he will eventually turn into a machine-aware instruction, and the instructions of the machine will not change. He is simply the expression of the code in the form of writing a different format. 1.2 is shown below:

650) this.width=650; "src=" Http://img.mp.itc.cn/upload/20160905/35ec4b5f9c3c4866a7a57f4ef7525830.jpg "style=" border:0px;margin:0px;padding:0px;font-size:0px; "/>

Figure 8.12

Another example of China's real estate, starting from 2008 real estate is like rain over Chunsun the same pull up, the former small county has no elevator room, and then after a few years everywhere are elevator room. So the structure of the property, the house when he is nothing but a frame, there is no bricks, in fact, he is all made up of mixed soil, the inside is reinforced and then used bone frame up, skeleton is very strong. The problem is that the house is not concerned about the time there are several rooms, if you need to divide a few rooms and a few halls, then take boards or bricks to divide, if one day do not have the wall can be knocked down to make other. When the wall is knocked down, he will not affect the structure of the whole house. In the current house he is very concerned about the future development space, so knocked out any wall, he will not affect the structural changes in the housing.

The example above says that this is very extensible and does not need to be related to what's going on inside, but what you want to get out of it and what you put in there will change, and that's his flexibility. We write code that also enjoys this function, and when we write code, if we put some code in it or we pull out some of the code inside, he doesn't have to make a radical change. Process-oriented when you do something to him and make some changes, he's probably going to have a great change. It's not easy to expand.

Object-oriented is not the same, because he simulates a real life of a flexible extensibility, in the way of pumping out his how a place will not change, this is an object-oriented advantage. But he's just a written form of code, so learning to object-oriented is a code-writing format for learning to program. This format simulates life, that is, the extensibility of the flexibility that allows us to simulate life, all moving into the code. This is the object-oriented benefit.

Technology sharing: www.kaige123.com

This article from the "11247808" blog, reproduced please contact the author!

Java Object-oriented programming

Related Article

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.