guanxf

          我的博客:http://blog.sina.com.cn/17learning

            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
            71 隨筆 :: 1 文章 :: 41 評論 :: 0 Trackbacks
          package com.gxf.basic;
          public class ThisDemo {
             int i=1;
             public ThisDemo(){
            Thread thread=new Thread(){
            public void run(){
              for(;;){
              ThisDemo.this.run();
              try{
                sleep(1000);
              }catch(Exception e){
              e.printStackTrace();
              }
              }
            }
            };
            thread.start();
             }
            public void run(){
             System.out.println(i);
             i++;
            } 
             public static void main(String[] args) {
          new ThisDemo();
          }
          }
          posted on 2011-09-25 11:07 管先飛 閱讀(269) 評論(0)  編輯  收藏 所屬分類: Java技術
          主站蜘蛛池模板: 松溪县| 东平县| 青田县| 方正县| 化德县| 惠水县| 扬中市| 张北县| 阳江市| 阿鲁科尔沁旗| 济南市| 称多县| 锡林郭勒盟| 汕尾市| 丰台区| 哈尔滨市| 文昌市| 保山市| 河西区| 承德县| 东光县| 苗栗县| 女性| 额济纳旗| 南和县| 徐水县| 姚安县| 富顺县| 曲沃县| 温泉县| 丹江口市| 如东县| 峨眉山市| 洛宁县| 阜城县| 新郑市| 银川市| 武清区| 兖州市| 都安| 元江|