Search code examples
javastruts2struts

Why is ActionSupport in Struts a class and not an interface?


Interfaces give more flexibility to Java developers than concrete classes do. I am new to the Struts framework, and I'm confused about the Struts developers' decision to make ActionSupport a class. In my opinion, it should be an interface. Why did they do that?


Solution

  • You should read the documentation here

    Provides a default implementation for the most common actions. See the documentation for all the interfaces this class implements for more detailed information.

    It is actually a default implementation for the interface Action. And since it is an implementation it cannot be an interface because interfaces are 100% abstract.