title: Java Member Initialization Patterns
body: <p>I have a class MyClass:</p>
  
  <pre><code>public class MyClass {
    private MyComplexType member1;
  }
  </code></pre>
  
  <p>I have to do some pretty intense initialization on <code>member1</code>.  Enough that it easily warrants its own method, called from the <code>MyClass</code> constructor.</p>
  
  <p>My question is, which of the following formats is best for this method?</p>
  
  <pre><code>private MyComplexType initMyComplexType() { 
    MyComplexType result = new MyComplexType();  
    // extensive initialization on result...
    return result;
  }
  </code></pre>
  
  <p>called like this:</p>
  
  <pre><code>public MyClass() {
    member1 = initMember1();
  }
  </code></pre>
  
  <p><strong>OR</strong></p>
  
  <pre><code>private void initMember1() {
    member1 = new MyComplexType();
    // extensive initialization on member1...
  }
  </code></pre>
  
  <p>called like this:</p>
  
  <pre><code>public MyClass() {
    initMember1();
  }
  </code></pre>
  
  <p>Which is the better style for a <strong>private</strong> member?  Why?</p>