创建线程——实现Runnable接口

interface:定义接口(用public修饰)

implements:实现

 

 例如:

 

 结果:

 

posted @ 2021-11-08 00:17  滔滔是个java小白  阅读(38)  评论(0编辑  收藏  举报