以下哪個是適當(dāng)?shù)膆ashCode定義方法?()
A. return super.hashCode(); B. return name.hashCode() + age * 7; C. return name.hashCode() + comment.hashCode() /2; D. return name.hashCode() + comment.hashCode() / 2 - age * 3;
下面代碼的運(yùn)行結(jié)果是什么?()
A. 0 B. 1 C. 2 D. 3 E. 4 F. 編譯錯誤 G. 運(yùn)行時拋出異常
A. 42 B. 0042 C. An exception is thrown at runtime. D. Compilation fails because of an error in line 13. E. Compilation fails because of an error in line 14.