title: Converting a Java Map object to a Properties object
body: <p>Is anyone able to provide me with a better way than the below for converting a Java Map object to a Properties object?</p>
  
  <pre><code>    Map&lt;String, String&gt; map = new LinkedHashMap&lt;String, String&gt;();
      map.put("key", "value");
  
      Properties properties = new Properties();
  
      for (Map.Entry&lt;String, String&gt; entry : map.entrySet()) {
          properties.put(entry.getKey(), entry.getValue());
      }
  </code></pre>
  
  <p>Thanks</p>