package com.twod4z; /** * @program: com.twod4z * @description: * @author: Mr.Lin * @create: 2019年8月7日 **/ public class MyThread extends Thread{ public void run() { for(int i=0;i<=20;i++) { Thread t=Thread.currentThread(); System.out.println((i+1)+".你好,来自线程"+t.getName()); } } }
相关文章: