Java OOP: Interfaces & Anonymous Classes

Java    |    Intermediate
  • 10 videos | 1h 9m 9s
  • Includes Assessment
  • Earns a Badge
Rating 4.8 of 47 users Rating 4.8 of 47 users (47)
In this course, you will focus on one of the most important concepts in all object-oriented programming for Java, the interface. Learners explore how anonymous inner classes provide lightweight instantiations of interfaces, and how interfaces are pure abstract entities. Begin with an introduction into using interfaces and how all their methods are abstract by default. Examine how the instanceof operator works the same way with interfaces as with classes. This leads on to combining the extends and implements keywords: implementing a derived class that can extend a base class and implement an interface. Then learners learn to set up two inheritance hierarchies and combine these into a set of objects that implement both sets of interfaces. Advanced features of interfaces are also examined. Learn how interfaces can support default method implementations. You will set up a class that implements some of the methods of an interface and declares itself abstract. Finally, you will create and define anonymous inner class objects and access outer class variables from your anonymous inner class.

WHAT YOU WILL LEARN

  • Discover the key concepts covered in this course
    Use interfaces and recognized that all of their methods are abstract by default
    Recognize how the instanceof operator works the same way with interfaces as with classes
    Implement a derived class that can both extend a base class and implement an interface
    Set up two inheritance hierarchies and combine these into a set of objects that implement both set of interfaces
  • Use interfaces that support default method implementations
    Set up a class that implements some of the methods of an interface and then declares itself abstract
    Create and define anonymous inner class objects
    Access outer class variables from your anonymous inner class
    Summarize the key concepts covered in this course

IN THIS COURSE

  • 2m 19s
  • 10m 52s
    During this video, you will learn how to use interfaces and recognize that all of their methods are abstract by default. FREE ACCESS
  • Locked
    3.  Using instanceof with Interfaces
    9m 47s
    Upon completion of this video, you will be able to recognize how the instanceof operator works with interfaces in the same way as with classes. FREE ACCESS
  • Locked
    4.  Combining the extends and implements Keywords
    8m 21s
    In this video, you will implement a derived class that can extend a base class and implement an interface. FREE ACCESS
  • Locked
    5.  Multiple Inheritance of Interfaces
    7m 10s
    In this video, find out how to set up two inheritance hierarchies and combine these into a set of objects that implement both sets of interfaces. FREE ACCESS
  • Locked
    6.  Default Methods in Interfaces
    7m 32s
    During this video, you will learn how to use interfaces with default method implementations. FREE ACCESS
  • Locked
    7.  Abstract Classes that Implement Interfaces
    6m 46s
    In this video, you will learn how to set up a class that implements some of the methods of an interface and then declares itself abstract. FREE ACCESS
  • Locked
    8.  Anonymous Inner Classes
    7m 35s
    In this video, find out how to create and define anonymous inner class objects. FREE ACCESS
  • Locked
    9.  Outer Class Access from Anonymous Inner Classes
    6m 51s
    In this video, learn how to access outer class variables from your anonymous inner class. FREE ACCESS
  • Locked
    10.  Course Summary
    1m 56s

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.6 of 54 users Rating 4.6 of 54 users (54)
Rating 4.6 of 128 users Rating 4.6 of 128 users (128)
Rating 4.4 of 155 users Rating 4.4 of 155 users (155)

PEOPLE WHO VIEWED THIS ALSO VIEWED THESE

Rating 4.8 of 31 users Rating 4.8 of 31 users (31)
Rating 4.5 of 227 users Rating 4.5 of 227 users (227)
Rating 4.3 of 113 users Rating 4.3 of 113 users (113)