Instantiating a generic class in Java

Posted by ripper234 on Stack Overflow See other posts from Stack Overflow or by ripper234
Published on 2009-07-07T05:13:23Z Indexed on 2010/03/12 11:57 UTC
Read the original article Hit count: 128

Filed under:
|

I know Java's generics are somewhat inferior to .Net's.

I have a generic class Foo<T>, and I really need to instantiate a T in Foo using a parameter-less constructor. How can one work around Java's limitation?

© Stack Overflow or respective owner

Related posts about java

Related posts about generics