0

I'm trying to make a game communication protocol with a superinterface with 2 subinterfaces, but I want to make sure that no one will accidentally implement the superinterface. I can make a class abstract to prevent initialization, but allow extension. Is there a similar thing I can do to an interface to prevent implementation, but allow extension?

HYBR1D
  • 464
  • 2
  • 6
  • 19

1 Answers1

3

No, there is no such construct.

It is not possible to define an interface that can be extended but not implemented in Java.

Hulk
  • 6,399
  • 1
  • 30
  • 52