2

If I have a generic class

say and I need to find out what the class is typed to .. how would I do that?

class Stack<T>{    
   public String getType(){
       // what can i write here to get the class name of T ?
   }
}
SK176H
  • 1,219
  • 2
  • 14
  • 24

0 Answers0