| Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате |
| Форум программистов > Java: Общие вопросы > hashCode & equal |
| Автор: Entry_N3 25.3.2007, 00:08 |
| Which two statements are true regarding the return values of property written hashCode and equals methods from two instances of the same class? (Choose two) A. If the hashCode values are different, the objects might be equal. B. If the hashCode values are the same, the object must be equal. C. If the hashCode values are the same, the objects might be equal. D. If the hashCode values are different, the objects must be unequal. Answer ? |
| Автор: lesha_od 25.3.2007, 09:19 |
| C, D |
| Автор: Entry_N3 25.3.2007, 12:16 |
| Меня смущает "If the hashCode values are different, the objects must be unequal." Мугал пишет, что "Неравенство значений объектов не накладывает ограничений на значения хеш-функции". Согласно ему, здесь ответ только C. Да? |
| Автор: Entry_N3 25.3.2007, 15:59 |
| LSD, дошло |