java中的泛型系列五:自定義泛型

一、方法上申明泛型:html public <T> T a(T t){            return t;         }數組 調用:post public void testa(){         a("aaa");     }htm 二、方法上申明多個泛型:blog public <T,E,K>  void b(T t,E e,K k){     //能夠申明多個泛型     }c
相關文章
相關標籤/搜索