是指private吗?
可以,static反正只有一份存储空间

解决方案 »

  1.   

    static 能修饰局部变量和局部方法吗?
    这叫什么鬼话主语?你学过语文没有?
      

  2.   

    局部变量就是private变量,这句话怎么不行?
    难道你每说一句话都要分清主谓宾?
      

  3.   

    不能
    static只能修饰成员变量
    不能修饰方法中的变量
      

  4.   

    局部变量就是private变量?这个,俺保留意见。(这里的局部变量指的是在某一函数内定义的变量)肯定是不可以的,如果可以,程序会造成很大的混乱的。
      

  5.   

    我想从java变量的作用域上考虑这样是不行的,通常也没有必要这样做。楼主,能说说你的想法么?
      

  6.   

    private static int total = 0;
    private static final int MAX = 10;
    private static int swamp(int[] ary, int ind1, int ind2)
    {
    ....
    }all above three are legal.
    as a matter of fact, when a static method invokes other method in the class, or uses other variable in the Class, that variable or method has to be static regardless it's public, protected or private.
      

  7.   

    static静态修饰符,在静态方法中必须引用静态的变量
      

  8.   

    我想楼主的意思应该是
    void func(int Arg)
    {
        static int lastArg=0;    ...
    }上面的lastArg只在func中使用,似乎没必要放到class中,这样程序会更加清楚吧
      

  9.   

    我想不行,用了static修饰不就成了全局变量了吗,矛盾矛盾
      

  10.   

    局部方法何解?
    至于局部变量(方法内的变量)是不可以声明为static。
      

  11.   

    我个人认为
    你想把程序写的大时就知道
    写小时是否要管private
    public,protected.的关系吗。我认为没必要