黑马程序员技术交流社区

标题: 看线程来分析结果,打印谁先,为什么会打印它先. [打印本页]

作者: L番茄X    时间: 2015-5-25 21:45
标题: 看线程来分析结果,打印谁先,为什么会打印它先.
class MyThread extends Thread
{
    public void run(){
    try{
       Thread.sleep(3000);
    }catch(InterruptedException e){
    }
     System.out.println("B");
}
}
class Demo
{
    public static void main(String[] args)
{
      MyTread t = new MyTread();
        t.run();
       t.start();
      System.out.println("A");
}
}

作者: 许鑫    时间: 2015-5-25 23:15
hao,顶。。。。。。
作者: niuapp    时间: 2015-5-25 23:59
什么意思啊,没搞明白




欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) 黑马程序员IT技术论坛 X3.2