title: How to sort Properties in java?
body: <p>I have a <code>Properties</code> object and sometimes I need to add other <code>Properties</code> to it.</p>
  
  <pre><code>Properties myBasicProps = this.getClass.getResourceAsStream(MY_PROPS_PATH);
  ...
  Properties otherProps = new Properties();
  otherProps.load(new StringReader(tempPropsString)); //tempPropsString contains my temporary properties
  myBasicProps.putAll(otherProps);
  </code></pre>
  
  <p>I want to sort <code>myBasicProps</code> after this. I don't want to get all keys and values, sort them with <code>Collections.sort()</code> and then put it all to a new object. Is there a better way?</p>