这种问题无须高手回答,
请使用 Properties 类
具体用法
如下
      String sFile = "./mydata.dat";
      FileInputStream is = null;
      Properties dbProps = null;
      try{
        is= new FileInputStream(sFile);//读取系统属性文件
        dbProps = new Properties();
        dbProps.load(is);
////////////读
        String str3 = dbProps.getProperty(str1,str2);
///////////写
        dbProps.setProperty(str1,str2);
        dbProps.store(new FileOutputStream(sFile),"#YZPackage");
      }catch (IOException e) {}