标签:pack info 继承 str src ide pre ack int
package MoreThread; public class MoreThread implements Runnable{ @Override public void run() { for(int i = 0;i < 20;i++ ) { System.out.println(); String name = Thread.currentThread().getName(); System.out.println((i+1)+".你好,来自线程"+name); } } } package MoreThread; public class Main { public static void main(String[] args) { MoreThread mt = new MoreThread(); Thread l1 = new Thread(mt); Thread l2 = new Thread(mt); l1.start(); l2.start(); } }
标签:pack info 继承 str src ide pre ack int
原文地址:https://www.cnblogs.com/lev1/p/11306187.html