title: Java generics constraint require default constructor like C#
body: <p>In C#, I can put a type constraint on a generic parameter that requires the generic type to have a default parameterless constructor.  Can I do the same in Java?</p>
  
  <p>In C#:</p>
  
  <pre><code>    public static T SomeMethodThatDoesSomeStuff&lt;T&gt;() where T : class, new()
      {
              // ... method body ...
      }
  </code></pre>
  
  <p>The class and new() constraints mean that T must be a class that can be called with the new operator with zero parameters.  What little I know of Java generics, I can use <code>extends</code> to name a required super class.  Can I use that (or any other supported operation) to achieve the above functionality?</p>