当前位置:网站首页>Object oriented thinking
Object oriented thinking
2022-07-02 03:34:00 【MangataTS】
# Summary of knowledge points Chapter II
1. object : Representing something " complex " Data is called objects , That is, some basic data types / The new composite data type formed by putting the composite data type into a class becomes an object
2. Object oriented languages have many advantages , Such as code reuse 、 extensible 、 Easy to maintain, etc
3. Three characteristics of object-oriented language : encapsulation 、 inheritance 、 polymorphism
encapsulation : Encapsulation immediately realizes the hiding of data , Some data is hidden from other parts of the program , Prevent others from modifying important data
inheritance : To support code reusability 、 Reduce the total amount of code in the program
polymorphism :Java There are two kinds of polymorphism: Method rewriting and method overloading
4.static The modified variable is a class variable
5. stay Java You can use private To modify a class ( It is usually used in one class Inside , Ensure data security )
6.System Classes of cannot be instantiated , That is, you cannot create System The object of , Usually we can go directly through System. visit System Method or property of
7. Every class must have a constructor , If you don't write it yourself , The system will generate a constructor by default , So a class must have a constructor , And the constructor has no return value
8. class 、 attribute 、 Methods can be modified by more than one modifier such as private static……
9. A static method of a class ( Yes static modification ) Can't access non static member variables , But an instance method ( nothing static modification ) You can access any member variable
10. Static variables are shared by all instance objects of the same class
11. Instance variables can only be accessed through objects , But class variables ( Static variables ) It can be accessed through classes or objects
12. The instance method of class represents The behavior of class objects
边栏推荐
- What do you know about stock selling skills and principles
- halcon图像矫正
- MySQL之账号管理
- In depth interpretation of pytest official documents (26) customized pytest assertion error information
- Imageai installation
- Kotlin basic learning 16
- C # joint Halcon's experience of breaking away from Halcon environment and various error reporting solutions
- Docker installs canal and MySQL for simple testing and implementation of redis and MySQL cache consistency
- UI (New ui:: MainWindow) troubleshooting
- Global and Chinese market of gynaecological health training manikin 2022-2028: Research Report on technology, participants, trends, market size and share
猜你喜欢
![[designmode] Prototype Pattern](/img/ee/c4e48c2ce8ff66f50f0bf13e5a0418.png)
[designmode] Prototype Pattern

What do you know about stock selling skills and principles

NLog使用

Yan Rong looks at how to formulate a multi cloud strategy in the era of hybrid cloud

一天上手Aurora 8B/10B IP核(5)----从Framing接口的官方例程学起

MSI announced that its motherboard products will cancel all paper accessories

"Analysis of 43 cases of MATLAB neural network": Chapter 42 parallel operation and neural network - parallel neural network operation based on cpu/gpu

Getting started with MQ

NLog use
![[mv-3d] - multi view 3D target detection network](/img/aa/741b36ead2dfaa5a165401b8d657b7.jpg)
[mv-3d] - multi view 3D target detection network
随机推荐
[golang] leetcode intermediate bracket generation & Full Permutation
Global and Chinese markets for electronic laryngoscope systems 2022-2028: Research Report on technology, participants, trends, market size and share
Eight steps of agile development process
uniapp 使用canvas 生成海报并保存到本地
VS2010 plug-in nuget
Review materials of project management PMP high frequency examination sites (8-1)
Discrimination between sap Hana, s/4hana and SAP BTP
KL divergence is a valuable article
Oracle的md5
MSI announced that its motherboard products will cancel all paper accessories
Docker安装canal、mysql进行简单测试与实现redis和mysql缓存一致性
Kotlin basic learning 16
GSE104154_scRNA-seq_fibrotic MC_bleomycin/normalized AM3
In the era of programmers' introspection, five-year-old programmers are afraid to go out for interviews
ImageAI安装
MySQL index, transaction and storage engine
Kotlin basic learning 17
aaaaaaaaaaaaa
Verilog wire type
h5中的页面显示隐藏执行事件