当前位置:网站首页>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 .
边栏推荐
- MySQL -- convert rownum in Oracle to MySQL
- Drawing Nyquist diagram with MATLAB
- go操作redis
- PyQt5_ Qscrollarea content is saved as a picture
- Talk about idempotent design
- 卷积神经网络(入门)
- Integral link, inertia link and proportion link in Simulink
- How to use SAP's metadata framework (MDF) to build custom business rules?
- 2022家用投影仪首选!当贝F5强悍音画效果带来极致视听体验
- Use of swagger
猜你喜欢

YOLOv3&YOLOv5输出结果说明

博睿数据一体化智能可观测平台入选中国信通院2022年“云原生产品名录”

MySQL45讲——学习极客时间MySQL实战45讲笔记—— 04 | 深入浅出索引(上)

自定义事件,全局事件总线,消息订阅与发布,$nextTick

Code implementation MNLM

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

Simple introduction to ENSP

Use bloc to build a page instance of shutter

刚好1000粉丝,记录一下
![[Hongke technology sharing] how to test DNS server: DNS performance and response time test](/img/f4/d8c21d6c33985fd6d819cd44c22c72.png)
[Hongke technology sharing] how to test DNS server: DNS performance and response time test
随机推荐
Thymeleaf dependency
Analysis of CPU surge in production environment service
selenium的特点
[to be continued] [UE4 notes] l5ue4 model import
In 2021, the global TCB adapter revenue was about $93 million, and it is expected to reach $315.5 million in 2028
P3008 [usaco11jan]roads and planes g (SPFA + SLF optimization)
Solving the longest subsequence with linear DP -- three questions
Use of UIC in QT
抓包工具fiddler学习
自定义事件,全局事件总线,消息订阅与发布,$nextTick
BeanUtils--浅拷贝--实例/原理
Who is better, Qianyuan projection Xiaoming Q1 pro or Jimi new play? Which configuration is higher than haqu K1?
Dingtalk send message
Qt原代码基本知识
路由(二)
千元投影小明Q1 Pro和极米NEW Play谁更好?和哈趣K1比哪款配置更高?
HMS core machine learning service helps zaful users to shop conveniently
MySQL45讲——学习极客时间MySQL实战45讲笔记—— 05 | 深入浅出索引(下)
P1908 逆序对
Integral link, inertia link and proportion link in Simulink