Constructor in an Interface?

Taking some of the things you have described:

“So you could be sure that some fields in a class are defined for
every implementation of this interface.”

“If a define a Interface for this class so that I can have more
classes which implement the message interface, I can only define the
send method and not the constructor”

…these requirements are exactly what abstract classes are for.

Leave a Comment

tech