package com.model.map.hashtable.properties;
import java.io.*;
import java.util.Properties;
/**
* @Description:测试类
* @Author: 张紫韩
* @Crete 2021/6/15 18:47
*/
public class PropertiesDemo01 {
public static void main(String[] args) throws IOException {
/**
* 1.继承了hashtable
* 2.键值对不能为null
* 3.
* */
Properties properties=new Properties();
properties.put("a", "a");
System.out.println(properties.get("a"));
properties.remove("a");
properties.put("b", "b");
FileReader fileReader = new FileReader("D:\\qq\\IDEA\\IdeaProjects\\java_mianshi_test\\mianshi_jihe\\src\\main\\java\\com\\model\\map\\hashtable\\properties\\db.properties");
properties.load(new BufferedReader(fileReader));
System.out.println(properties.getProperty("a"));
System.out.println(properties.getProperty("b"));
}
}