title: Why Exception has to be handled at compile time in case of static variable[a] whereas when same variable [a] is instance no requirement of handling?
body: <p>class Test{</p>
  <pre><code>public static Test a=new Test();//Why compile time error of  [unreported exception Exception] is coming here
  </code></pre>
  <p>// public  Test a=new Test();//No compile time error  of  [unreported exception Exception]</p>
  <pre><code>public Test() throws Exception {
          throw new Exception(&quot;I am coming out&quot;);
  }
  
  public static void main(String[] as) {
      try {
          Test t=new Test();
              Sop(&quot;surprise!&quot;);
      }catch(Exception e) {
              Sop(&quot;I told u so&quot;);
      }
  }
  </code></pre>
  <p>}</p>