【implements】publicabstractclassAimplementsB不太理解implementsB的是什么...
答案:2 悬赏:10 手机版
解决时间 2021-02-21 09:58
- 提问者网友:不要迷恋哥
- 2021-02-21 04:48
【implements】publicabstractclassAimplementsB不太理解implementsB的是什么...
最佳答案
- 五星知识达人网友:杯酒困英雄
- 2021-02-21 06:15
【答案】 泛型技术,看完代码,你将知道很多.
public interface B {
public T get();
}
public abstract class A implements B {
public Object get() {
//code here,and return a Object type value.
return null;
}
}
public abstract class C implements B {
public Integer get() {
//code here,and return a Integer type value.
return null;
}
}
public interface B {
public T get();
}
public abstract class A implements B {
public Object get() {
//code here,and return a Object type value.
return null;
}
}
public abstract class C implements B {
public Integer get() {
//code here,and return a Integer type value.
return null;
}
}
全部回答
- 1楼网友:渡鹤影
- 2021-02-21 07:44
你的回答很对
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯