title: How to merge two java.util.Properties objects?
body: <p>I'm trying to have a default <code>java.util.Properties</code> object in my class, with the default properties it accepts, and let the developer override some of them by specifying another <code>java.util.Properties</code> object, but I couldn't find a nice way for doing that.</p>
  
  <p>The intended usage is the following:</p>
  
  <pre><code>Properties defaultProperties = new Properties();
  defaultProperties.put("key1", "value1");
  defaultProperties.put("key2", "value2");
  
  Properties otherProperties = new Properties();
  otherProperties.put("key2", "value3");
  
  Properties finalProperties = new Properties(defaultProperties);
  
  //
  // I'd expect to have something like:
  // 
  // finalProperties.merge(otherProperties);
  //
  </code></pre>