title: Other Ways of Singleton in Java
body: <p>Just i was thinking about the other ways of writing singleton class. So is this class considered as a singleton class?</p>
  
  <pre><code>      public class MyClass{
              static Myclass myclass;
  
              static { myclass = new MyClass();}
  
              private MyClass(){}
  
              public static MyClass getInstance()
              { 
                  return myclass;
              }
         }
  </code></pre>
  
  <p>as the static block run only once.</p>