問題詳情

185  5e4de37a20190.jpg
Which statement is true?
(A) The equals method does NOT properly override the Object.equals method.
(B) Compilation fails because the private attribute p.name cannot be accessed in line 5.
(C) To work correctly with hash-based data structures, this class must also implement the hashCode method.
(D) When adding Person objects to a java.util.Set collection, the equals method in line 4 will preventduplicates.

參考答案

無參考答案

內容推薦

內容推薦