zz.properties
#aaa 注解 都是 键--值
ram=512
rom=314
获取属性
Properties properties=new Properties();
properties.load(new FileReader("zz.properties"));
System.out.println(properties.getProperty("ram"));
System.out.println(properties.getProperty("rom"));
//读取xml文件
properties.loadFromXML(new FileInputStream("hehe.xml"));
properties.getProperty("111")
设置属性
properties.setProperty("111","1");
properties.setProperty("222","2");
properties.store(new FileOutputStream("hehe.properties"),"我是说明");
properties.store(new FileOutputStream("hehe.properties"),"我是说明");
//存储成xml文件
properties.storeToXML(new FileOutputStream("hehe.xml"),"I am xml");