MCQOPTIONS
Saved Bookmarks
| 1. |
Which statement is true? class Test1 { public int value; public int hashCode() { return 42; } } class Test2 { public int value; public int hashcode() { return (int)(value^5); } } |
| A. | Class Test1 will not compile. |
| B. | The Test1 hashCode() method is more efficient than the Test2 hashCode() method. |
| C. | The Test1 hashCode() method is less efficient than the Test2 hashCode() method. |
| D. | Class Test2 will not compile. |
| Answer» D. Class Test2 will not compile. | |