Java OOP: Understanding Overriding & Hiding in Inheritance
Java SE 13
| Intermediate
- 12 Videos | 1h 22m 50s
- Includes Assessment
- Earns a Badge
In this course, you will learn about method overriding, including the use of the super keyword from contexts other than within constructions, and also examine the behavior of static methods. To start, participants learn how to apply method overriding and recognize the concept of hiding, and use the super keyword inside any method invocation in the derived class. This follows on to the use of advanced forms of overriding, combining method overriding with complex inheritance hierarchies. Study static methods and static binding, recognizing that static methods do not support run-time polymorphism. Examine pitfalls to avoid with static methods by learning to recognize how static methods are bound using compile-time rather than run-time binding. Learn how to correctly override the method .toString, which is inherited from java.lang.Object, and describe how the .equals method and the == operator are related. Explore how to correctly override the .hashCode method and write the code to correctly override the .equals method, inherited from java.lang.Object. Finally, after studying the link between equals and hashCode, discover how to implement the .hashCode contract.
WHAT YOU WILL LEARN
-
discover the key concepts covered in this courseapply method overriding and recognize the concept of hidinguse the super keyword inside any method invocation in the derived classuse advanced forms of overridingcombine method overriding with fairly complex inheritance hierarchiesrecognize that static methods don't support run-time polymorphism
-
recognize how static methods are bound using compile-time rather than run-time bindingoverride the method .toString, which is inherited from java.lang.Objectdescribe how the .equals method and the == operator are relatedcorrectly override the .hashCode method and write the code to correctly override the .equals method, which is inherited from java.lang.Objectcompletely and correct implement the .hashCode contractsummarize the key concepts covered in this course
IN THIS COURSE
-
1.Course Overview2m 21sUP NEXT
-
2.Method Overriding and Hiding8m 10s
-
3.Method Invocation and the super Keyword9m 14s
-
4.Overriding Base Class Methods6m 6s
-
5.Method Overriding with Inheritance Hierarchies6m
-
6.Static Methods and Static Binding8m 9s
-
7.Pitfalls to Avoid with Static Methods6m 16s
-
8.Overriding toString Correctly8m 56s
-
9.Overriding equals Correctly8m 22s
-
10.Overriding hashCode Correctly7m 21s
-
11.The Link between equals and hashCode10m 17s
-
12.Course Summary1m 37s
EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE
Skillsoft is providing you the opportunity to earn a digital badge upon successful completion of this course, which can be shared on any social network or business platform
Digital badges are yours to keep, forever.