1) No. T is erasable.

2) If myClass is a class or generic type, you should be able to "new
Test<myClass>".
   On the other hand, if myClass is a pointer/variable, no you can't "new
Test<myClass>"


On 6/27/06, Raymond Feng <[EMAIL PROTECTED]> wrote:

Generics gurus,

Assuming I have the following class:

public class Test<T> {
...
}

1) Is there a way to get the Class object for T in class Test? I know
T.class is illegal.
2) Can I create the an instance of Test using a Class object myClass. I
know new Test<myClass> is not valid.

Thanks,
Raymond





--

Yang ZHONG

Reply via email to