我看了一下:
strs 置空 不能解决问题,如何删除 字符串数组 strs

解决方案 »

  1.   

    public class test  {
    public static void main(String[] args){
    String[] strs = new String[255];
    for(int i=0; i<100; i++){
    strs[i] = Integer.toString(i);
    }
    //  
    strs = null;  
    System.out.println("strs = " + strs);
                      //strs = null
    }

      

  2.   

    如何删除 字符串数组 strs
      

  3.   

    用Vector吧Vector strs = new Vector();
      

  4.   

    我看了一下:
    strs 置空 不能解决问题,如何删除 字符串数组 strs----------------------------------------------------------------------
    楼主想解决什么问题?
    strs置空后,将没有引用指向刚才你所开辟的数组空间,这样,一段时间后该数组空间就将被回收,难道还不能解决问题吗?
      

  5.   

    strs =null;
    就是空啊,你怎么测试出不为空的结果啊?
      

  6.   

    用{ String[] strs = new String[10];…… }的程序块来结束strs的生命周期。
      

  7.   

    strs=null
    结果不为空????????
      

  8.   

    顺便俺提个问题;
    怎么把字符串数组重新负值
    例如:String a[]={"a","b"};
    怎么才能让a[]={"a","b","c"};