package com.freeflying.thread.base; /** * @ClassName: ImplementsRunable * @Description:realize thread by implements runable interface * @author freeflying * @date 2018年6月21日 */ public class ImplementsRunable{ public static void main(String[] args) { MyRunable1 myRunable1=new MyRunable1(); Thread thread = new Thread(myRunable1); thread.start(); System.out.println("run end!!!"); } } class MyRunable1 implements Runnable{ @Override public void run() { System.out.println("current thread is running!"); } }
实现runable来实现多线程
猜你喜欢
转载自blog.csdn.net/weixin_42097648/article/details/80767033
今日推荐
周排行