Java_总结二十一(Properties 类)
Properties 类
import java.util.Properties; public class Test { public static void main(String[] args) { // 经常作为 配置 信息 可以帮助持久的存储数据 // 存放的键 和 值 都是String类型的 Properties properties = new Properties(); properties.setProperty("a", "aaa"); properties.setProperty("c", "ccc"); properties.setProperty("b", "bbb"); properties.setProperty("b", "bbb"); System.out.println(properties); String value = properties.getProperty("b"); System.out.println(value); } }