程序:classMyDate{privateintyear;privateintmonth;privateintday;publicMyDate(intyear,intmont

13 查阅

程序:classMyDate{privateintyear;privateintmonth;privateintday;publicMyDate(intyear,intmonth,intday){this.year=year;this.month=month;this.day=day;}//OverrideMethod}为了让newMyDate(1980,11,9)==(判断是否相等)newMyDate(1980,11,9)返回true,必须在OverrideMethod处覆盖哪个方法?()

A.hashCode

B.equals

C.toString

D.notify

参考答案:

参考B

计算机考试