这种问题无须高手回答,
请使用 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) {}
请使用 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) {}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货