Knowing type of generic in Java

后端 未结 7 890
醉话见心
醉话见心 2020-12-03 16:17

I have a generic class, says :

MyClass

Inside a method of this class, I would like to test the type of T, for example :

         


        
相关标签:
7条回答
  • 2020-12-03 17:12

    If you want to do different things for different types would it still be generic?

    0 讨论(0)
提交回复
热议问题