当前位置:网站首页>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 .
边栏推荐
- Quarkus学习四 - 项目开发到部署
- P3008 [usaco11jan]roads and planes g (SPFA + SLF optimization)
- 代码实现MNLM
- 错误:EACCES:权限被拒绝,访问“/usr/lib/node_modules”
- Browser driven Download
- MySQL 45 lecture - learning the actual battle of MySQL in Geek time 45 Lecture Notes - 05 | easy to understand index (Part 2)
- PyQt5_ Qscrollarea content is saved as a picture
- Subcontracting configuration of uniapp applet subpackages
- MySQL 45 lecture - learning from the actual battle of geek time MySQL 45 Lecture Notes - 04 | easy to understand index (Part 1)
- The global special paper revenue in 2021 was about $27 million, and it is expected to reach $35 million in 2028. From 2022 to 2028, the CAGR was 3.8%
猜你喜欢
错误:EACCES:权限被拒绝,访问“/usr/lib/node_modules”
Qt新项目_MyNotepad++
Essential elements of science fiction 3D scenes - City
[Hongke technology sharing] how to test DNS server: DNS performance and response time test
The conference on the growth of all things was held in Hangzhou, and dangbei was selected into the top 100 list of future unicorns in China in 2022
C crystal report printing
瀏覽器驅動的下載
QT new project_ MyNotepad++
QT - make a simple calculator - realize four operations
Drawing Nyquist diagram with MATLAB
随机推荐
The xftp connection Haikang camera reported an error: the SFTP subsystem application has been rejected. Please ensure that the SFTP subsystem settings of the SSH connection are valid
In 2021, the global revenue of structural bolts was about $796.4 million, and it is expected to reach $1097.6 million in 2028
Slashgear shares 2021 life changing technology products, which are somewhat unexpected
Story points vs. human days
ensp简单入门
Launcher startup process
给Android程序员的一些面试建议「建议收藏」
Do you know that there is an upper limit on the size of Oracle data files?
selenium,元素操作以及浏览器操作方法
Dingtalk send message
【模板】最长公共子序列 (【DP or 贪心】板子)
Selenium installing selenium in pycharm
c# 水晶报表打印
MySQL 45 lecture - learning the actual battle of MySQL in Geek time 45 Lecture Notes - 05 | easy to understand index (Part 2)
Dingtalk 发送消息
Pattern matching and regular expressions in PostgreSQL - Das
uniapp小程序 subPackages分包配置
Integral link, inertia link and proportion link in Simulink
Selenium, element operation and browser operation methods
MySQL45讲——学习极客时间MySQL实战45讲笔记—— 04 | 深入浅出索引(上)