Program Along - Overriding Methods of Class Object
In this video, we develop a program that overrides three methods of class Object: equals, hashCode, and toString. We also implement the interface Comparable and look at the different ways to check for equality. We use generated code snippets from Eclipse to improve productivity, and we access doc comments from the superclass and add additional information that is specific to the overridden method. Every so often, you will be asked you to pause the video and to implement a specific task. Take a moment and give it a try. Once you continue the video you'll find a solution to compare your code with.
In this video, we develop a program that overrides three methods of class Object: equals, hashCode, and toString. We also implement the interface Comparable and look at the different ways to check for equality. We use generated code snippets from Eclipse to improve productivity, and we access doc comments from the superclass and add additional information that is specific to the overridden method. Every so often, you will be asked you to pause the video and to implement a specific task. Take a moment and give it a try. Once you continue the video you'll find a solution to compare your code with.
