我有这样的层次结构:
public class A {
public abstract int hashCode();
}
public class B extends A {
public int hashCode(){
//I want this to return the object implementation of hash code
return 0;
}
}
Run Code Online (Sandbox Code Playgroud)
我希望b.hashCode()返回hashCode()的Object实现.不幸的是B必须扩展A,而A不能改变.
| 归档时间: |
|
| 查看次数: |
73 次 |
| 最近记录: |