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技術
          主站蜘蛛池模板: 富顺县| 丰都县| 白山市| 丰原市| 济阳县| 福州市| 申扎县| 金山区| 永州市| 巴彦县| 界首市| 改则县| 东乌珠穆沁旗| 抚州市| 泸定县| 鄂托克旗| 井研县| 图木舒克市| 绥中县| 金山区| 江阴市| 马边| 嘉鱼县| 婺源县| 五峰| 镇平县| 汕头市| 家居| 云安县| 瑞安市| 延川县| 巧家县| 吉水县| 白朗县| 调兵山市| 社旗县| 资源县| 揭西县| 那曲县| 安塞县| 华宁县|