Skip to content

Commit

Permalink
lambda3__使用实现类
Browse files Browse the repository at this point in the history
  • Loading branch information
CPU-Code committed Sep 15, 2020
1 parent 06f42d6 commit db82c00
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
30 changes: 30 additions & 0 deletions Lambda/lambda3.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* @由于个人水平有限, 难免有些错误, 还请指点:
* @Author: cpu_code
* @Date: 2020-09-15 18:34:01
* @LastEditTime: 2020-09-15 18:36:00
* @FilePath: \java\Lambda\lambda3.java
* @Gitee: [https://gitee.com/cpu_code](https://gitee.com/cpu_code)
* @Github: [https://github.com/CPU-Code](https://github.com/CPU-Code)
* @CSDN: [https://blog.csdn.net/qq_44226094](https://blog.csdn.net/qq_44226094)
* @Gitbook: [https://923992029.gitbook.io/cpucode/](https://923992029.gitbook.io/cpucode/)
*/
package Lambda;

public class lambda3 {
public static void main(String[] args){
Runnable task = new RunnableImpl();
new Thread(task).start();
}
}

class RunnableImpl implements Runnable{
@Override
public void run() {
System.out.println("多线程任务执行");
}
}

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

- [x] [lambda1__冗余的Runnable代码](thread/lambda1.java)
- [x] [lambda2__Lambda优写](thread/lambda2.java)

- [x] [lambda3__使用实现类](thread/lambda3.java)


-----------
Expand Down

0 comments on commit db82c00

Please sign in to comment.