title: Java code optimization tips and tricks
body: <p>Specifically looking for Java code tips and tricks of the trade for:</p>
  <ul>
  <li>reducing memory footprint</li>
  <li>increasing performance</li>
  </ul>
  <p>Personally would like to see answers focusing on the <em>&quot;how&quot;</em> and not the <em>&quot;when&quot;</em> as the consensus among savvy developers is that early optimization is a bad idea as you don't have anything to profile and thus don't know what the actual bottlenecks will be.</p>
  <blockquote>
  <p>&quot;We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil&quot;</p>
  <p>&quot;In established engineering disciplines a 12 % improvement, easily obtained, is never considered marginal and I believe the same viewpoint should prevail in software engineering&quot;</p>
  <p><em><strong>Donald Knuth</strong></em></p>
  </blockquote>