标题:线程问题
取消只看楼主
请问你好吗
Rank: 2
等 级:论坛游民
帖 子:64
专家分:51
注 册:2011-11-27
结帖率:81.48%
已结贴  问题点数:5 回复次数:0 
线程问题
class Example6_1
{
public static void main (String [] args){
  innThread mt = new innThread ();
  mt.start ();
  for (int i = 0; i < 50; i++)
    System.out.println ("i = " + i);
  }
}
//通过继承Thread实现线程
class innThread extends Thread
{
  public void run ()
  {
    for (int count = 1, row = 1; row < 20; row++, count++)
    {
       for (int i = 0; i < count; i++)
          System.out.print ('*');
       System.out.print ('\n');
    }
  }
}
线程重 mt.start ();开始,请问哪里结束还有就是row起到什么作用
搜索更多相关主题的帖子: public class void count 
2012-03-08 18:23



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-362595-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.805247 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved