Java tutorial
import java.util.Enumeration; import java.util.Properties; public class Main { public static void main(String[] args) throws Exception { Properties prop = new Properties(); prop.put("Chapter Count", "200"); prop.put("Tutorial Count", "15"); prop.put("tutorial", "java2s.com"); // assign the property names in a enumaration Enumeration<?> enumeration = prop.propertyNames(); // print the enumaration elements System.out.println(enumeration.nextElement()); System.out.println(enumeration.nextElement()); } }