Skip to content

Commit db82c00

Browse files
committed
lambda3__使用实现类
1 parent 06f42d6 commit db82c00

File tree

2 files changed

+32
-2
lines changed

2 files changed

+32
-2
lines changed

Lambda/lambda3.java

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* @由于个人水平有限, 难免有些错误, 还请指点:
3+
* @Author: cpu_code
4+
* @Date: 2020-09-15 18:34:01
5+
* @LastEditTime: 2020-09-15 18:36:00
6+
* @FilePath: \java\Lambda\lambda3.java
7+
* @Gitee: [https://gitee.com/cpu_code](https://gitee.com/cpu_code)
8+
* @Github: [https://github.com/CPU-Code](https://github.com/CPU-Code)
9+
* @CSDN: [https://blog.csdn.net/qq_44226094](https://blog.csdn.net/qq_44226094)
10+
* @Gitbook: [https://923992029.gitbook.io/cpucode/](https://923992029.gitbook.io/cpucode/)
11+
*/
12+
package Lambda;
13+
14+
public class lambda3 {
15+
public static void main(String[] args){
16+
Runnable task = new RunnableImpl();
17+
new Thread(task).start();
18+
}
19+
}
20+
21+
class RunnableImpl implements Runnable{
22+
@Override
23+
public void run() {
24+
System.out.println("多线程任务执行");
25+
}
26+
}
27+
28+
/*
29+
多线程任务执行
30+
*/

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* @由于个人水平有限, 难免有些错误, 还请指点:
33
* @Author: cpu_code
44
* @Date: 2020-07-12 12:03:11
5-
* @LastEditTime: 2020-09-15 18:11:48
5+
* @LastEditTime: 2020-09-15 18:33:57
66
* @FilePath: \java\README.md
77
* @Gitee: [https://gitee.com/cpu_code](https://gitee.com/cpu_code)
88
* @Github: [https://github.com/CPU-Code](https://github.com/CPU-Code)
@@ -301,7 +301,7 @@ java编程基础 面向对象 javaAPI 集合 IO GUI JD8C 多线程 网络编程
301301

302302
- [x] [lambda1__冗余的Runnable代码](thread/lambda1.java)
303303
- [x] [lambda2__Lambda优写](thread/lambda2.java)
304-
304+
- [x] [lambda3__使用实现类](thread/lambda3.java)
305305

306306

307307
-----------

0 commit comments

Comments
 (0)