国产chinesehdxxxx野外,国产av无码专区亚洲av琪琪,播放男人添女人下边视频,成人国产精品一区二区免费看,chinese丰满人妻videos

App下載
首頁javapropertiesJava Collection - 如何從屬性獲取鍵列表

Java Collection - 如何從屬性獲取鍵列表

我們想知道如何從屬性獲取鍵列表。

propertyNames() method in Properties class combines the keys in the properties list with the keys in the defaults properties list passed into the constructor.

import java.io.FileInputStream; import java.util.Enumeration; import java.util.Properties; public class MainClass { public static void main(String args[]) throws Exception { Properties p = new Properties(); p.load(new FileInputStream("test.txt")); Enumeration e = p.propertyNames(); for (; e.hasMoreElements();) { System.out.println(e.nextElement()); } } }