Java OOP: Understanding Overriding & Hiding in Inheritance

Java    |    Intermediate
  • 12 videos | 1h 22m 50s
  • Includes Assessment
  • Earns a Badge
Rating 4.8 of 32 users Rating 4.8 of 32 users (32)
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

  • 2m 21s
  • 8m 10s
    In this video, you will learn how to apply method overriding and recognize the concept of hiding. FREE ACCESS
  • Locked
    3.  Method Invocation and the super Keyword
    9m 14s
    To use the super keyword inside any method invocation in the derived class, find out how. FREE ACCESS
  • Locked
    4.  Overriding Base Class Methods
    6m 6s
    In this video, learn how to use advanced forms of overriding. FREE ACCESS
  • Locked
    5.  Method Overriding with Inheritance Hierarchies
    6m
    During this video, you will learn how to combine method overriding with complex inheritance hierarchies. FREE ACCESS
  • Locked
    6.  Static Methods and Static Binding
    8m 9s
    Upon completion of this video, you will be able to recognize that static methods don't support polymorphism at runtime. FREE ACCESS
  • Locked
    7.  Pitfalls to Avoid with Static Methods
    6m 16s
    Upon completion of this video, you will be able to recognize how static methods are bound using compile-time rather than run-time binding. FREE ACCESS
  • Locked
    8.  Overriding toString Correctly
    8m 56s
    Find out how to override the .toString method, which is inherited from java.lang.Object. FREE ACCESS
  • Locked
    9.  Overriding equals Correctly
    8m 22s
    After completing this video, you will be able to describe how the .equals method and the == operator are related to each other. FREE ACCESS
  • Locked
    10.  Overriding hashCode Correctly
    7m 21s
    In this video, learn how to correctly override the .hashCode method and write the code to correctly override the .equals method, which is inherited from java.lang.Object. FREE ACCESS
  • Locked
    11.  The Link between equals and hashCode
    10m 17s
    In this video, you will learn how to correctly and completely implement the .hashCode contract. FREE ACCESS
  • 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 on some of our courses, which can be shared on any social network or business platform.

Digital badges are yours to keep, forever.

YOU MIGHT ALSO LIKE

Rating 4.5 of 160 users Rating 4.5 of 160 users (160)
Rating 4.6 of 37 users Rating 4.6 of 37 users (37)
Rating 4.4 of 38 users Rating 4.4 of 38 users (38)

PEOPLE WHO VIEWED THIS ALSO VIEWED THESE

Rating 4.8 of 47 users Rating 4.8 of 47 users (47)
Rating 4.7 of 41 users Rating 4.7 of 41 users (41)
Rating 4.7 of 52 users Rating 4.7 of 52 users (52)