title: class newInstance propagates checked and unchecked exceptions - is it true?
body: <p>According to this: <a href="https://docs.oracle.com/javase/tutorial/reflect/member/ctorTrouble.html" rel="nofollow">https://docs.oracle.com/javase/tutorial/reflect/member/ctorTrouble.html</a></p>
  
  <blockquote>
    <p>Class.newInstance() Throws Unexpected Exception
    The ConstructorTroubleToo example shows an unresolvable problem in Class.newInstance(). Namely, it propagates any exception — checked or unchecked — thrown by the constructor.</p>
    
    <p>This situation is unique to reflection. Normally, it is impossible to write code which ignores a checked exception because it would not compile. It is possible to wrap any exception thrown by a constructor by using Constructor.newInstance() rather than Class.newInstance().</p>
  </blockquote>
  
  <p>Below I have a code that doesnt catch any unchecked (RuntimeEcxeption/Error) exception I commented them and it compiles. So where is this propagation? I wrote code that ignores unchecked exceptions which was told to be impossible. Please explain me what is wrong with Class.newInstance() regarding the above quotations?</p>
  
  <pre><code>try {
          Class&lt;?&gt; c = Class.forName("ConstructorTroubleToo");
          // Method propagetes any exception thrown by the constructor
          // (including checked exceptions).
  
          Object o = c.newInstance();
  
          // production code should handle these exceptions more gracefully
      } catch (ClassNotFoundException | 
              InstantiationException | 
              IllegalAccessException  x
             /*IllegalArgumentException | 
               SecurityException x*/ ) {
          x.printStackTrace();
      }
  </code></pre>