Java.util.Properties.stringPropertyNames() 方法


Java.util.Properties.stringPropertyNames() 方法

package com.codingdict;

import java.util.*;

public class PropertiesDemo {
   public static void main(String[] args) {
      Properties prop = new Properties();

      // add some properties
      prop.put("Height", "200");
      prop.put("Width", "15");

      // save the Property names in the set
      Set<String> set = prop.stringPropertyNames();

      // print the set
      System.out.println("" + set);
   }
}