Java interfaces and constructors

Question:
Is there a way to force a specific constructor with an interface?

Answer:
No, there is no way to force implementors of a given interface to use constructors with a specific signature. Interfaces can only be used to provide common method signatures.

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

Recent Articles: