title: C# to Java: where T : new() Syntax
body: <p>I am porting some C# code over to Java. I am having trouble with the where Syntax, specifically new(). I understand that where is similar to Java's generic: T extends FOO. </p>
  
  <p><strong>How I can replicate the new() argument in Java?</strong></p>
  
  <p><a href="http://msdn.microsoft.com/en-us/library/6b0scde8(VS.80).aspx" rel="nofollow noreferrer">"The new() Constraint lets the compiler know that any type argument supplied must have an accessible parameterless--or default-- constructor." - MSDN</a></p>
  
  <p>ie:</p>
  
  <pre><code>public class BAR&lt;T&gt; : BAR
         where T : FOO, new()
  </code></pre>
  
  <p>Here is how I implemented cletus's solution:</p>
  
  <pre><code>public class BAR&lt;T extends FOO&gt; extends ABSTRACTBAR {
      public BAR(T t) throws InstantiationException, IllegalAccessException{ 
          t.getClass().newInstance();
          this.value = t;
      }
  }
  </code></pre>