Topic: 哪位高手帮帮我看看这个程序错在哪里啊

  Print this page

1.哪位高手帮帮我看看这个程序错在哪里啊 Copy to clipboard
Posted by: jiangbinwoaini
Posted on: 2005-08-09 13:00

public class Xo extends Thread
{Xo(){}
public void run(){
System.out.println("呵呵");
System.out.println("哈哈");
t1.sleep(5000);
System.out.println("我我");
}
public static void main(String[] args)
  {Xo t1=new Xo();
t1.start();
    
  }
}

2.Re:哪位高手帮帮我看看这个程序错在哪里啊 [Re: jiangbinwoaini] Copy to clipboard
Posted by: ljy0000
Posted on: 2005-08-09 14:27

没捕捉异常

3.Re:哪位高手帮帮我看看这个程序错在哪里啊 [Re: jiangbinwoaini] Copy to clipboard
Posted by: FlowerBud
Posted on: 2005-08-09 17:37

public class Xo extends Thread
{
  Xo()
  {}
  public void run()
  {
    System.out.println("呵呵");
    System.out.println("哈哈");
    Thread t1 = new Thread();
    try
    {
      t1.sleep(5000);
    }
    catch (InterruptedException e)
    {}
    System.out.println("我我");
  }
  public static void main(String[] args)
   {
    Xo t1=new Xo();
    t1.start();
   }
}


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923