0
How to get type of generic
I have something like this public <T> void getXxx(Response<T> resp){ } I want to check if T is String for example
1 ответ
+ 2
There is no easy way. Why you need it at all? You doing something wrong if logic of your code depends ot generic type. Generic type should be used in places where type of data does not matter.