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