程序:
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處覆蓋哪個(gè)方法?()
A. hashCode
B. equals
C. toString
D. notify
A. true
B. false
C. 1
D. 0
E. hello