I had several discussions about when it makes sense to declare an interface in Java.
I only found two possible reasons!
- If you could have more than one implementation of this interface (I think this is the original intention for interfaces)
- If you want to use proxies. (i.e. remoting or dynamic proxies)
In any other cases you should think twice if there is really a need for an interface!
This sounds very simple in a way, but I think this is an important finding.
If you know any other important reason – please let me know!