Java OOP: Understanding Overriding & Hiding in Inheritance

Java SE 13    |    Intermediate
  • 12 Videos | 1h 27m 50s
  • Includes Assessment
  • Earns a Badge
Likes 34 Likes 34
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 course
    apply method overriding and recognize the concept of hiding
    use the super keyword inside any method invocation in the derived class
    use advanced forms of overriding
    combine method overriding with fairly complex inheritance hierarchies
    recognize that static methods don't support run-time polymorphism
  • recognize how static methods are bound using compile-time rather than run-time binding
    override the method .toString, which is inherited from java.lang.Object
    describe how the .equals method and the == operator are related
    correctly override the .hashCode method and write the code to correctly override the .equals method, which is inherited from java.lang.Object
    completely and correct implement the .hashCode contract
    summarize the key concepts covered in this course

IN THIS COURSE

  • Playable
    1. 
    Course Overview
    2m 21s
    UP NEXT
  • Playable
    2. 
    Method Overriding and Hiding
    8m 10s
  • Locked
    3. 
    Method Invocation and the super Keyword
    9m 14s
  • Locked
    4. 
    Overriding Base Class Methods
    6m 6s
  • Locked
    5. 
    Method Overriding with Inheritance Hierarchies
    6m
  • Locked
    6. 
    Static Methods and Static Binding
    8m 9s
  • Locked
    7. 
    Pitfalls to Avoid with Static Methods
    6m 16s
  • Locked
    8. 
    Overriding toString Correctly
    8m 56s
  • Locked
    9. 
    Overriding equals Correctly
    8m 22s
  • Locked
    10. 
    Overriding hashCode Correctly
    7m 21s
  • Locked
    11. 
    The Link between equals and hashCode
    10m 17s
  • Locked
    12. 
    Course Summary
    1m 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.

YOU MIGHT ALSO LIKE

PEOPLE WHO VIEWED THIS ALSO VIEWED THESE

Likes 248 Likes 248