title: java reflection constructor.newInstance gives "wrong number of arguments"
body: <p>How to fix my code below?</p>
  
  <pre><code>package mypackage;
  
  import java.lang.reflect.Constructor;
  import java.lang.reflect.Method;
  import java.lang.reflect.Modifier;
  import java.util.ArrayList;
  import java.util.Arrays;
  import java.util.HashSet;
  import java.util.List;
  
  public class testReflection {
      public class You {
          public You(String s) {
          }
  
          public void f(String s, int i) {
              System.out.println(i + 100);
          }
      }
  
      public static void main(String[] args) throws NoSuchMethodException {
          Constructor constructor =
                  You.class.getConstructor(testReflection.class, String.class);
          try {
              You y = (You)constructor.newInstance("xzy");//Exception!!!!
              System.out.println("ok");
              y.f("xyz",2);
          }catch(Exception e){
              e.printStackTrace();
          }
      }
  }
  </code></pre>
  
  <p>The exception message is:</p>
  
  <pre><code>java.lang.IllegalArgumentException: wrong number of arguments
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      at mypackage.testReflection.main
  </code></pre>