import java.io.IOException;
import java.util.Properties;
public class PropertyMgr {
static Properties props = new Properties();
static {
try {
props.load(PropertyMgr.class.getClassLoader().getResourceAsStream("1.properties"));
} catch (IOException e1) {
e1.printStackTrace();
}
}
private PropertyMgr() {};
public static String getProperty(String key) {
return props.getProperty(key);
}
}
1.properties:initTankCount=10
reProduceTankCount=3