The wrapper classes override those two methods for you. For example, see the
JavaDoc for Integer. YOu can see it has equals() and hashCode() overridden.
IN your own classes, you need to provide these two methods so the collections classes can call them and see if your objects are equal, belong to the same hash bucket, etc.