title: 2 implementations of Singleton
body: <p>I know of 2 ways to implement the singleton pattern in java and im wondering which one is better and why.</p>
  
  <p>the first way is:</p>
  
  <ol>
  <li>declare the constructor of the class private</li>
  <li>have everything inside the class static - basiclly have the class instance itself be the singleton</li>
  </ol>
  
  <p>second way is:</p>
  
  <ol>
  <li>declare the constructor of the class private </li>
  <li>have a static member to hold the singleton (which may be an instance of the class)</li>
  <li>have a static getInstance() method</li>
  </ol>
  
  <p>I tend to think that even though the second approach is the most common, the first approach may produce better code readability, both approaches seem similiarly efficient in runtime complexity, so i dont really get the reasons behind why the second approach is way more common and considered better practice...</p>
  
  <p>enlighten me!</p>