問題詳情

210  5e4df9ffb61a8.jpg
What is the appropriate definition of the hashCode method in class Person?
(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;

參考答案

無參考答案

內容推薦

內容推薦