Two Children
Learning Objectives
State the importance of well-behaved Java objects
List and describe the required functionality of a well-behaved Java object
State the purpose of the hashCode() method
Describe two algorithms for implementing a suitable hashCode() method
Demonstrate your ability to implement a suitable hashCode() method
Describe how Java collections framework classes utilize the hashCode() method
Describe how Java collections framework classes utilize the equals() method
State the reasons for overriding the toString() method
State the purpose of the equals() method
Describe the contract for implementing the equals() method
Describe the proper use of the clone() method
Explain the difference between a deep copy vs. a shallow copy
Describe the proper use of the finalize() method
List and describe the differences between the Comparator and Comparable interfaces
Describe what it means for a class of objects to have a natural ordering
State the purpose of the Serializable interface