title: Why it is OK to construct a new object while class has not been fully loaded?
body: <pre><code>public class Test{
      static Test test = new Test();
      static {
          System.out.println("Test class ...");
      }
      public static void main(String[] args){
  
      }
  }
  </code></pre>
  
  <p>See code above , class <code>Test</code> will get loaded when <code>main</code> is called and a static instance called <code>test</code> will be constructed , has <code>Test</code> class been loaded already when <code>static Test test = new Test();</code> is called ? If not , is it safe to do like this ? If loaded, is it safe to construct a new object when class has been loaded but not initialized ? </p>
  
  <p><strong>Edit</strong><br>
  Code above seems to be causing much concern about the main method while it is not what I am asking .    </p>
  
  <pre><code>public class App{
      public static void main(String[] args) {
          new Test();
      }
  }
  class Test{
      static Test app = new Test();
      static{
          System.out.println("Test   ");
      }
      {
          System.out.println("constructing a Test object ...");
      }
  }
  </code></pre>
  
  <p>Code here , am I constructing Test object before Test class initialized ? Is it safe to do so ? Is @Thirler's answer telling that it is not safe but can do so ? </p>