I read (p. 245)

Interfaces are designed to support dynamic resolution of method calls at run time. As a rule, for a normal execution of a method call from one class to another, both classes must be present at compile time so that the Java compiler can verify the compatibility of method signatures. In itself, this requirement creates a static and non-extensible class distribution environment. In such a system, functionality will inevitably be passed up the class hierarchy, with the result that mechanisms will become available to more and more subclasses. Interfaces are designed to prevent this problem. They isolate the definition of a method or set of methods from the inheritance hierarchy. And since the hierarchy of interfaces does not coincide with the hierarchy of classes, classes that are not hierarchically interconnected can implement the same interface. This is where the interface capabilities most fully manifest themselves.

The following statements are not completely clear:

  1. In itself, this requirement creates a static and non-extensible class distribution environment.
  2. In such a system, functionality will inevitably be passed up the class hierarchy, with the result that mechanisms will become available to more and more subclasses.

I intuitively guess the essence, but I cannot manage to formulate an understanding for myself internally.

  • What is the tin you read. As if a level 80 bureaucrat was writing. - rjhdby

1 answer 1

  1. There is one class. There is his heir. There is an heir to the heir, and so on. As a result, lower classes acquire all the methods of their parents.