364课后一题

package com.hanqi;

public class thread extends Thread {

    public void run() {
        outInfo();
    }
    
    public void outInfo() {
        for (int i = 0; i < 10; i++) {
            System.out.println("你不必太张扬,是花自然香。");

            try {
                Thread.sleep(100);
            } catch (InterruptedException e) {
                // TODO 自动生成的 catch 块
                e.printStackTrace();
            }
        }
    }

    public static void main(String[] args) {
        thread t = new thread();
        
        t.start();
        
        thread h = new thread();
        
        h.start();

    }

}
原文地址:https://www.cnblogs.com/Yue0327/p/5158035.html