当前位置:网站首页>How many knowledge points can a callable interface have?
How many knowledge points can a callable interface have?
2022-07-02 14:13:00 【User 1263954】
Concurrent programming has always been a headache for programmers , How to write a correct concurrent program compared to other programs , It's a more difficult thing , In concurrent programming Bug It is often very strange .
The reason why concurrent programming appears Bug It's weird , Because in concurrent programming , A lot of times Bug It may not be perfectly reproduced , in other words , Concurrent programming Bug It's hard to reproduce , Hard to track .
today , The glacier brought the little friends back again Callable Interface , Okay , Let's get to the point .
This article is pure dry goods , In depth analysis from the perspective of source code Callable Interface , I hope you will step down , Open your IDE, Follow the article to see the source code , I believe you will gain a lot .
Callable The interface is introduced
Callable Interface is JDK1.5 New generic interface , stay JDK1.8 in , Declared as a functional interface , As shown below .
@FunctionalInterface
public interface Callable<V> {
V call() throws Exception;
}
stay JDK 1.8 Only one method's interface is declared as a functional interface in , Functional interfaces can be used @FunctionalInterface To modify , You can also not use @FunctionalInterface To modify . As long as an interface contains only one method , that , This interface is a functional interface .
stay JDK in , Realization Callable The subclass of the interface is shown in the figure below .
The default subclass hierarchy diagram is not clear , here , Can pass IDEA Right click Callable Interface , choice “Layout” To specify the Callable Interface implementation, different structure of class diagram , As shown below .
here , You can choose “Organic Layout” Options , After selection Callable The structure of subclasses of interfaces is shown in the figure below .
In the realization of Callable In subclasses of interfaces , There are several important classes , As shown in the figure below .
边栏推荐
- docker mysql
- 联合搜索:搜索中的所有需求
- 关于Flink框架窗口(window)函数最全解析
- Packet capturing tool Fiddler learning
- 代码实现MNLM
- TeamTalk源码分析之win-client
- Quarkus learning IV - project development to deployment
- Slashgear shares 2021 life changing technology products, which are somewhat unexpected
- Dangbei projection 4K laser projection X3 Pro received unanimous praise: 10000 yuan projector preferred
- Multi rotor aircraft control using PID and LQR controllers
猜你喜欢

Qt-制作一个简单的计算器-实现四则运算-将结果以对话框的形式弹出来

In 2021, the global styrene butadiene styrene (SBS) revenue was about $3722.7 million, and it is expected to reach $5679.6 million in 2028

Qt新项目_MyNotepad++

全屋Wi-Fi:一个谁也解决不好的痛点?

Qt入门-制作一个简易的计算器

Custom events, global event bus, message subscription and publishing, $nexttick

默认插槽,具名插槽,作用域插槽

<口算练习机 方案开发原理图>口算练习机/口算宝/儿童数学宝/儿童计算器 LCD液晶显示驱动IC-VK1621B,提供技术支持

SystemServer进程

Everyone believes that the one-stop credit platform makes the credit scenario "useful"
随机推荐
Penetrate the remote connection database through the Intranet
Some interview suggestions for Android programmers "suggestions collection"
Thymeleaf dependency
Getting started with QT - making a simple calculator
MySQL45讲——学习极客时间MySQL实战45讲笔记—— 04 | 深入浅出索引(上)
QT - make a simple calculator - realize four operations
Use of UIC in QT
Quarkus learning IV - project development to deployment
Qt入门-制作一个简易的计算器
Code implementation MNLM
693. 行程排序(map + 拓扑)
Codeforces Round #803 (Div. 2)(A~D)
石子合并板子【区间DP】(普通石子合并 & 环形石子合并)
How kaggle uses utility script
故事點 vs. 人天
博睿数据一体化智能可观测平台入选中国信通院2022年“云原生产品名录”
In 2021, the global revenue of structural bolts was about $796.4 million, and it is expected to reach $1097.6 million in 2028
BeanUtils -- shallow copy -- example / principle
Qt-制作一个简单的计算器-实现四则运算-将结果以对话框的形式弹出来
P1042 [NOIP2003 普及组] 乒乓球