问题描述:
[单选]
程序: class MyDate{ private int year; private int month; private int day; public MyDate(int year,int month,int day){ this.year=year; this.month=month; this.day=day; } //Override Method } 为了让new MyDate(1980,11,9)==new MyDate(1980,11,9)返回true,必须在Override Method处覆盖哪个方法?
A.hashCode
B.equals
C.toString
D.notify
参考答案:查看无
答案解析:无
☆收藏
答案解析:无
☆收藏
上一篇:class Account { private int balance; public void setBalance(int b){ balance = b; } public int getBalance(){ return balance; } public void clearBalance(){ balance = 0; } } 哪一个改变可以使 Account 类线程安全?
下一篇:怎样申报产业扶贫项目?
- 我要回答: 网友(216.73.216.136)
- 热门题目: 1.在网络拓扑结构中,星形结构的 2.有关健康教育概念哪项是错误( 3.天津购房商业贷款能否转为公积
