我的属性文件中有值,例如,
bloodpressure.properties :
(key,value) : (血压,你的血压是B6,这很高)
在我的 java 类中,我正在从属性文件中读取值,但我想用计算值替换值,例如,
String B6 = "120";
Properties bp = new Properties();
bp.load(new FileInputStream("filename"));
String bpstr = bp.getProperty(bloodpressure);
现在,我想用上面的 B6 值(120)替换 B6 值。
我怎样才能动态地做到这一点?,我有很多这样的字符串。
我只想遍历属性文件,这些值应该替换为计算值。