6

Sometimes I see a class implements interfaces A and B, but A has already extended B, any reasons behind this ?

For example, the AbstractInterruptibleChannel class.

public abstract class AbstractInterruptibleChannel
    implements Channel, InterruptibleChannel

But InterruptibleChannel extends Channel already:

public interface InterruptibleChannel
    extends Channel
Basil Bourque
  • 262,936
  • 84
  • 758
  • 1,028
user2018791
  • 1,111
  • 12
  • 27
  • 2
    Dunno. Possibly an error by the coder. API writers are human after all. – markspace Jan 06 '21 at 03:54
  • related: [Why do many Collection classes in Java extend the abstract class and implement the interface as well?](https://stackoverflow.com/questions/3854748/) – jaco0646 Jan 06 '21 at 04:18

0 Answers0