标题:我是初学者 下面的错误怎么该啊!!!!
只看楼主
夜中梦
Rank: 1
等 级:新手上路
帖 子:132
专家分:0
注 册:2007-5-12
 问题点数:0 回复次数:1 
我是初学者 下面的错误怎么该啊!!!!
我是初学者 下面的错误怎么该啊!!!!
public class Apply
{
    public static void main (String[]args)
            {static int x;
                    int y;
                    x=10;
                    Apply.pt=new Apply;
                    pt.y=20;
              System.out.println("x");
              System.out.println("y");
            }
   
class Best extends Apply
{
         public static void main(String[]args)
         { static int z;
         z=30;
         System.out.println("x");
         System.out.println("y");
         System.out.println("z");
         }
}
}
搜索更多相关主题的帖子: public 
2007-12-04 18:16
windcloud
Rank: 1
等 级:新手上路
帖 子:30
专家分:0
注 册:2007-4-18
得分:0 
public class Apply
{
    static int x = 10;
    int y;
    public static void main (String[] args)
       {
              Apply  pt=new Apply();
           pt.y=20;
           System.out.println(x);
           System.out.println(pt.y);
        }
           
           
    }





class Best extends Apply
{
     static int z =30;
     
     public static void main(String[] args)
        {
         System.out.println(x);
         //System.out.println("y");  (不要)
         System.out.println(z);
         }
}

2007-12-04 18:53



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




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

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