© Kishori Sharan 2017

Kishori Sharan, Beginning Java 9 Fundamentals, https://doi.org/10.1007/978-1-4842-2902-6_21

21. Interfaces

Kishori Sharan

(1)Montgomery, Alabama, USA

In this chapter, you will learn:

  • What interfaces are

  • How to declare interfaces

  • How to declare abstract, default, and static methods in interfaces

  • How to fully and partially implement interfaces in a class

  • How to evolve interfaces after they are published

  • How to inherit an interface from other interfaces

  • Using the instanceof operator with interfaces

  • What marker interfaces are

  • How interfaces can be used to implement polymorphism

  • How dynamic binding applies to method calls on interface type variables

All example programs in this chapter are a member of a jdojo.interfaces module, as declared ...

Get Beginning Java 9 Fundamentals: Arrays, Objects, Modules, JShell, and Regular Expressions now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.