JAVA继承范型

子类保持范型:
public class Child<T, M> extend Father<T, M>
{
@Override
public void test(T t, M m)
{
//
}
}

子类定型:
public class Child extend Father<String, Integer>
{
@Override
public void test(String t, Integer m)
{
// …
}
}

发布了2538 篇原创文章 · 获赞 308 · 访问量 186万+

猜你喜欢

转载自blog.csdn.net/quantum7/article/details/104673121