当前位置:网站首页>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
边栏推荐
- DAMENG 用户管理
- [the most complete ENSP [installation diagram] in history!]
- Js学习基础document.write在页面中写一行文字
- (taking pytorch as an example) a simple understanding of the regularization method of path (depth) -drop path
- Typescript configuring ts in koa and using koa router
- Batch splice string
- Typescript class and interface, class and generic, interface merging
- 134. gas station
- Typescript keyboard mapping
- Introduction to the principles of linkedblockingqueue, arrayblockingqueue, synchronousqueue, concurrentlinkedqueue and transferqueue
猜你喜欢

Process control: process waiting (recycling child processes)

How to do well in empty state design? Look at this comprehensive summary

How to make hyperlinks in RichTextBox- How can I make a hyperlink work in a RichTextBox?

Node error report sorting

Anaconda related knowledge supplement (spyder+keras Library)

【 史上最全的ENSP【安装图解】!】

Crawl Baidu Baipin dynamic page

Asynchronous notification mechanism of character device driver

Solve valueerror: no model found in config file

Introduction to guava cache usage
随机推荐
彻底记住ImageView的background和src的区别
Solve notimplementederror: layer XX has arguments in`__ init__` and therefore must override `get_ config`
Summary of embedded software interview questions
How to start participating in the open source community
How many of the 50 questions about network knowledge can you answer correctly?
TypeScript-头文件使用细节
Introduction to guava cache usage
Use Jackson's @jsonproperty annotation to add one more field to the property name. Solution to the problem
Image processing operation record
字符设备驱动程序之异步通知机制
(transformation) tree, binary tree and forest transformation principle
torch. meshgrid
Shell Programming Notes
uniapp 插件开发
Typescript enumeration
Bat batch processing separate environment packaging
Use of Excel to XML tool of TestLink
Xshell7 and xftp7 to continue using this program, you must apply the latest updates or use a new version
qiao-lerna:lerna辅助工具
Activity中,View#postDelay会导致内存泄漏,但是不会影响Activity的生命周期执行。