Properties作为Map集合
作者:互联网
package com.itheima_03; import java.util.Properties; import java.util.Set; public class PropertiesDemo01 { public static void main(String[] args) { Properties prop = new Properties(); prop.put("itheima001", "林青霞"); prop.put("itheima002", "张曼玉"); prop.put("itheima003", "王祖贤"); Set<Object> keySet = prop.keySet(); for (Object key : keySet) { Object value = prop.get(key); System.out.println(key + "," + value); } } }
标签:Map,java,keySet,prop,put,key,集合,Properties 来源: https://blog.csdn.net/weixin_43748647/article/details/116834216