当前位置:网站首页>Interfaces and abstract classes
Interfaces and abstract classes
2022-06-11 08:18:00 【Want Xiaoxin】
Difference
| abstract | Interface |
|---|---|
| Only one abstract class can be inherited | There can be multiple interfaces |
| There can be construction methods | Can not have |
| Common member variable | No, |
| Common method | Must be abstract |
| The access type of an abstract method can be public,protected | Abstract methods can only be public |
| Contains static methods | Can not contain |
| Static member variables can be arbitrary | Can only public static final |
| Mainly in code , Implementing code reuse plays a role in the architecture design approach | , It mainly defines the communication contract between modules |
The same thing
1、 Can't be instantiated
2、 The implementation class of the interface or the subclass of the abstract class Can only be instantiated after the methods in the interface or abstract class are implemented
边栏推荐
- Use special characters to splice strings "+“
- Alchemy experience (model training of deep learning) the necessity of timely adjusting training parameters for some situations (the adjustment of learning rate LR is the primary) summarizes some metho
- Typescript null and undefined
- Anaconda related knowledge supplement (spyder+keras Library)
- 通过ComponentCallbacks2来接收onTrimMemory等回调,并mock对应的场景
- Closure and minimum dependency in database
- Introduction to guava cache usage
- Empty difference between postgrepsql and Oracle
- DAMENG 数据库启停
- Icml2022 article intéressant
猜你喜欢

torch. nn. functional. pad

Anaconda related knowledge supplement (spyder+keras Library)

These gadgets are also very easy to use

使用 COCO 数据集训练 YOLOv4-CSP 模型

Empty difference between postgrepsql and Oracle

What does it mean to buy a single-mode, dual-mode and Rechargeable Wireless Mouse

Introduction to guava cache usage

如何开始参与开源社区

2022.6.6 extra long growth simulation

Process control: process waiting (recycling child processes)
随机推荐
Typescript type protection
字符设备驱动程序之异步通知机制
ICML2022有意思的文章
Multiple limit of the same field of SQL
Typescript recognizable Union
Summary of knowledge points of customized ViewGroup - continuously updated
AttributeError: module ‘tensorflow. compat. v2.__ internal__‘ has no attribute ‘register_ clear_ session_
记一次忽略@SuppressLint(“NewApi“)提示引发的血案
TypeScript-在koa中配置TS和使用koa-router
Asynchronous notification mechanism of character device driver
Bladed入門教程(視頻)
TypeScript-命名空间
Record a murder case caused by ignoring the @suppresslint ("newapi") prompt
使用特殊字符拼接字符串“+“
ConstraintLayout中使用Guideline限制控件最大宽度
Collation of basic knowledge of intermediate development of Andrews (for interview)
Node error report sorting
bat 批处理单独环境打包
(taking pytorch as an example) a simple understanding of the regularization method of path (depth) -drop path
彻底记住ImageView的background和src的区别