Mapping Relationships in Java: Overriding Methods and Using Access Modifiers

Java SE 15
  • 15 Videos | 2h 6m 31s
  • Includes Assessment
  • Earns a Badge
Method overriding is a way in which a derived class can redefine - and override - the implementation of a method already defined in a base class. By overriding only those methods you absolutely need to and relying on the base class implementations for all others, you get a lot done with relatively little new code. Use this course to learn how to carry out this technique. Explore the somewhat surprising behavior of static methods and the phenomenon known as hiding. Use the final keyword to mark member variables, member functions, and even entire classes. Use the abstract keyword to indicate a given method is not implemented. Study the semantics of the access modifiers public, private, protected, and package-private. When you're done, you'll recognize how overriding differs from hiding, the semantics of access modifiers, and how abstract classes are used.

WHAT YOU WILL LEARN

  • discover the key concepts covered in this course
    override methods to have different method implementations in derived classes
    use the super keyword in overridden methods
    identify method hiding when redefining static methods with the same name
    use the final modifier to restrict a field from being initialized except in constructors
    use the final modifier with methods to prevent overriding and with classes to prevent inheritance
    list the characteristics of an abstract class
    use abstract base classes in inheritance hierarchies
  • use the private access modifier to restrict access to fields and methods
    contrast the restrictions offered by the public and private access modifiers
    use factory methods to instantiate objects with private constructors
    use the protected access modifier to restrict access to derived classes and classes in the same package
    investigate the nuances of the protected access modifier
    use the default modifier to restrict access to other classes in the same package
    summarize the key concepts covered in this course

IN THIS COURSE

  • Playable
    1. 
    Course Overview
    1m 49s
    UP NEXT
  • Playable
    2. 
    Overriding Methods in Derived Classes
    9m 44s
  • Locked
    3. 
    Invoking Base Class Methods Using super()
    10m 45s
  • Locked
    4. 
    Identifying Method Hiding
    7m 3s
  • Locked
    5. 
    Using the Final Modifier with Fields
    10m 5s
  • Locked
    6. 
    Using the Final Modifier with Methods and Classes
    7m 18s
  • Locked
    7. 
    Characterizing Abstract Classes
    8m 46s
  • Locked
    8. 
    Using Abstract Classes in Inheritance Hierarchies
    11m 35s
  • Locked
    9. 
    Using the Private Access Modifier
    8m 39s
  • Locked
    10. 
    Using the Public and Private Modifiers
    5m 10s
  • Locked
    11. 
    Using Factory Methods to Instantiate Objects
    7m 46s
  • Locked
    12. 
    Using the Protected Access Modifier
    9m 5s
  • Locked
    13. 
    Investigating Protected Access Modifier Nuances
    10m 6s
  • Locked
    14. 
    Using the Default Access Modifier
    9m 13s
  • Locked
    15. 
    Course Summary
    2m 59s

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.