title: Java: Best Practice for Declaration and Initialization
body: <p>I do consider myself quite experienced in Java but there are still some minor basic things that I'm not really sure of.</p>
  
  <p>I always try to write maintainable, easy readable code and aim for highest efficency.
  For example I only call a "new"-Operator only when it is really needed.</p>
  
  <p>That is because I don't want to allocate memory unnecessarily.
  But what about supporting Variables?</p>
  
  <p>Lots of people tend to declare a String just to assign some long ass method call like this:</p>
  
  <p>String helper = Class.method1().method2(param).getter();</p>
  
  <p>I always wonder if that doesn't allocate more memory than needed.
  The getter returns a new Object already and now even more memory is allocated by referencing it in addition.
  When I have use this getter more than once a helper string is convenient, but if it is needed only once wouldn't it be better to pass that method directly instead of declaring a new variable? 
  Does this actually allocate memory to the heap?</p>
  
  <p>Object a, b, c, d, e ,f , g, h, i, j ...;</p>
  
  <p>I hope some more experienced Java guys than me can tell me how they handle basic stuff like this. thanks! :)</p>