当前位置: 代码迷 >> Java相关 >> Properties的put方法~求助
  详细解决方案

Properties的put方法~求助

热度:170   发布时间:2008-11-14 07:09:34.0
Properties的put方法~求助
public void tianjia(){
        
        Properties a=new Properties();

    
        
        
        try {
            OutputStream os=new FileOutputStream("E:\\123.properties");
            
            a.put(i,j );
            a.store(os,null);
            
            
            
            
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }

我做的一个简单的电话薄~用这个方法往列表里面添加的时候他总是会覆盖所有的键值!怎么能做到让他添加到最后面啊!
搜索更多相关的解决方案: Properties  put  

----------------解决方案--------------------------------------------------------
要用到其中的load方法和list方法
----------------解决方案--------------------------------------------------------
  相关解决方案