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
  • 303,325
  • 100
  • 852
  • 1,154
user2018791
  • 1,143
  • 15
  • 29
  • 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