package come.hanqi;

public class zuoye extends Thread {
    public void run(){
        zy();
    }
    public void zy(){
        for(int i=0;i<20;i++){
            System.out.println("张昊哲好帅!");
            try {
                Thread.sleep(100);
            } catch (InterruptedException e) {
                
                e.printStackTrace();
            }
        }
    }
}

 

package come.hanqi;

public class TestThread {

    public static void main(String[] args) throws InterruptedException {
            
            zuoye zuo=new zuoye();
            zuo.zy();
        }


}

 

相关文章:

  • 2021-07-04
  • 2022-01-02
  • 2021-08-19
  • 2021-08-14
  • 2021-11-26
  • 2021-06-01
  • 2022-12-23
  • 2021-11-21
猜你喜欢
  • 2022-12-23
  • 2021-08-03
  • 2021-05-20
  • 2021-08-10
  • 2021-10-06
  • 2021-11-26
  • 2022-12-23
相关资源
相似解决方案