title: Is it possible to create an instance of inner class using Java Reflection?
body: <p>Sample of code:</p>
  
  <pre><code>public class Foo
  {
      public class Bar
      {
           public void printMesg(String body)
           {
               System.out.println(body);
           }
      }
      public static void main(String[] args)
      {
           // Creating new instance of 'Bar' using Class.forname - how?
      }        
  }
  </code></pre>
  
  <p>Is it possible to create new instance of class Bar giving its name? I tried to use:</p>
  
  <pre><code>Class c = Class.forName("Foo$Bar")
  </code></pre>
  
  <p>it finds the class, but when i use c.newInstance() it throws InstantiationException.</p>