import java.util.Enumeration;

/*
 * This snippet show how to set and get properties.
 *
 * For more information, read "Le guide de survie Java" (chap. 2)
 * (by Timothy Fisher, ed. CampusPress)
 *
 * Usage:
 * - compile: javac Properties.java
 * - execute: java Properties
 */

public class Properties {
    public static void main(String [] args) {

        // Set the timezone property
        System.setProperty("timezone", "EsternStandardTime");
        
        // Get the timezone property
        String timezone = System.getProperty("timezone");
        System.out.println(timezone);
        
        // Get all properties
        java.util.Properties properties = System.getProperties();
        Enumeration propertyNames = properties.propertyNames();

        String key;

        while(propertyNames.hasMoreElements()) {
            key = (String) propertyNames.nextElement();
            System.out.println(key + " = " + properties.getProperty(key));
        }

    }
}

@@ -1,35 +1,4 @@
-import java.util.Enumeration;%0A%0A
 /*%0A 
@@ -16,16 +16,17 @@
 pet show
+s
  how to 
@@ -665,171 +665,46 @@
 ();%0A
-        Enumeration propertyNames = properties.propertyNames();%0A%0A        String key;%0A%0A        while(propertyNames.hasMoreElements()) %7B%0A            key = (S
+%09%09for (String key : properties.s
 tring
-) p
+P
 rope
@@ -715,36 +715,17 @@
 ames
-.nextElement();%0A            
+()) %7B%0A%09%09%09
 Syst
@@ -783,24 +783,18 @@
 (key));%0A
-        
+%09%09
 %7D%0A%0A    %7D

Improve a snippet.