1.25 作业

时间:2016-01-25 20:56:26   收藏:0   阅读:218
package com.lainxi2;

public class ceshi3 extends Thread{
    
    public void run()
    {
        dxc();
    }
    
    public void dxcf() 
    {
        for(int i = 0;i< 10;i++)
        {
            System.out.println(this + " 啦啦啦德玛西亚 ");
            
            try {
                Thread.sleep(100);
            } catch (InterruptedException e) {
                // TODO 自动生成的 catch 块
                e.printStackTrace();
            }
        }
    }
public class ceshi2 {

    public static void main(String[] args) throws InterruptedException {
        
        ceshi3 cs = new ceshi3();
        
        cs.start();
        
        ceshi3 cs1 = new ceshi3();
        
        cs1.start();
        

 

原文:http://www.cnblogs.com/baozhaba-xianchong/p/5158478.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!