java技術博客

          jsp博客
          數據加載中……
          java靜態成員
          /*01*/public class static_demo
          /*02*/{
          /*03*/    public static int i=0;
          /*04*/    public int j=0;
          /*05*/    public void show()
          /*06*/    {
          /*07*/    System.out.println(i);
          /*08*/    System.out.println(j);
          /*09*/    }

          /*10*/}

          /*11*/
          /*12*/class test
          /*13*/{
          /*14*/    public static void main(String args[])
          /*15*/    {
          /*16*/    static_demo obj1=new static_demo();
          /*17*/    obj1.i=100;
          /*18*/        obj1.j=200;
          /*19*/        obj1.show();
          /*20*/        static_demo obj2=new static_demo();
          /*21*/    obj2.show();
          /*22*/    }

          /*23*/}

          posted on 2008-11-03 14:14 郭興華 閱讀(96) 評論(0)  編輯  收藏


          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 锡林郭勒盟| 钟祥市| 呼伦贝尔市| 沿河| 蓝山县| 阿合奇县| 鄯善县| 社旗县| 潼关县| 保亭| 南投县| 绥德县| 夏河县| 碌曲县| 静宁县| 桐梓县| 和静县| 丹凤县| 增城市| 漳浦县| 临汾市| 金川县| 太仓市| 阿克陶县| 安多县| 杨浦区| 宜州市| 莆田市| 保定市| 东海县| 哈密市| 定陶县| 桂林市| 时尚| 句容市| 蓝山县| 沅陵县| 沂南县| 阳谷县| 汨罗市| 衡山县|