How to do `MyClass.class` in Java?

前端 未结 6 1273
有刺的猬
有刺的猬 2020-12-15 21:46

How can call public T doit(Class clazz); using MyClass.class as clazz where I can not instantiate or extend MyClas

6条回答
  •  既然无缘
    2020-12-15 22:19

    T corresponds to List, so any reference to String as the generic paramter of List is irrelevant.

提交回复
热议问题