title: Cannot instantiate the type Set
body: <p>I am trying to create a Set of Strings which is filled with the keys from a Hashtable so a for-each loop can iterate through the Set and put defaults in a Hashtable. I am still learning Java but the way I am trying to do it isn't valid syntax. Could someone please demonstrate the proper way of doing this and explain why my way doesn't work and theirs does.</p>
  
  <pre><code>private Hashtable&lt;String, String&gt; defaultConfig() {
      Hashtable&lt;String, String&gt; tbl = new Hashtable&lt;String, String&gt;();
      tbl.put("nginx-servers","/etc/nginx/servers");
      tbl.put("fpm-servers","/etc/fpm/");
      tbl.put("fpm-portavail","9001");
      tbl.put("webalizer-script","/usr/local/bin/webalizer.sh");
      tbl.put("sys-useradd","/sbin/useradd");
      tbl.put("sys-nginx","/usr/sbin/nginx");
      tbl.put("sys-fpmrc","/etc/rc.d/php_fpm");
      tbl.put("www-sites","/var/www/sites/");
      tbl.put("www-group","www"); 
      return tbl;
  }
  
  //This sets missing configuration options to their defaults.
  private void fixMissing(Hashtable&lt;String, String&gt; tbl) {
      Hashtable&lt;String, String&gt; defaults = new Hashtable&lt;String, String&gt;(defaultConfig());
      //The part in error is below...
      Set&lt;String&gt; keys = new Set&lt;String&gt;(defaults.keySet());
  
      for (String k : keys) {
          if (!tbl.containsKey(k)) {
              tbl.put(k, defaults.get(k));
          }
      }
  }
  </code></pre>