zoukankan      html  css  js  c++  java
  • 作业

    package come.hanqi;
    
    public class MyThread extends Thread{
        
        public void run() {
            
            
        
    
        
            
            for (int i = 0; i < 5; i++) {
                System.out.println("淄博汉企。");
                
                try {
                    Thread.sleep(100);
                } catch (InterruptedException e) {
                    // TODO 自动生成的 catch 块
                    e.printStackTrace();
                }
                
            }
        }
    }
    package come.hanqi;
    
    public class TestThread {
    
        public static void main(String[] args) throws InterruptedException {
            // TODO 自动生成的方法存根
    
            /*for(int i=0;i<20;i++)
            {
                System.out.println("i="+i);
                Thread.sleep(1000);
            }*/
            MyThread mt=new MyThread();
            
            mt.start();//启动多线程
            //mt.outInfo();
            
    MyThread mt1=new MyThread();
            
            mt1.start();
            
            /*MyRunnable mr=new MyRunnable();
            
            Thread th=new Thread(mr);
            
            th.start();
            
             MyRunnable mr1=new MyRunnable();
            
             th=new Thread(mr1);
            
            th.start();*/
        }
    
    }

    淄博汉企。
    淄博汉企。
    淄博汉企。
    淄博汉企。
    淄博汉企。
    淄博汉企。
    淄博汉企。
    淄博汉企。
    淄博汉企。
    淄博汉企。

  • 相关阅读:
    WTL介绍
    创业创意
    VelocityTracker简单介绍
    strip 命令的使用方法
    CFileDialog的使用方法简单介绍
    讨论oracle在rowid和rownum
    java entry
    24点经典算法
    char与byte差异
    蓝牙设计
  • 原文地址:https://www.cnblogs.com/crazy-zw/p/5158798.html
Copyright © 2011-2022 走看看