Why do some APIs provide mostly interfaces, not classes?

Posted by Lord Torgamus on Stack Overflow See other posts from Stack Overflow or by Lord Torgamus
Published on 2010-04-30T19:12:51Z Indexed on 2010/04/30 19:27 UTC
Read the original article Hit count: 203

Filed under:
|
|
|

Some Java APIs provide a large number of interfaces and few classes. For example, the Stellent/Oracle UCM API is composed of roughly 80% interfaces/20% classes, and many of the classes are just exceptions.

What is the technical reason for preferring interfaces to classes? Is it just an effort to minimize coupling? To improve encapsulation/information hiding? Something else?

© Stack Overflow or respective owner

Related posts about java

Related posts about interface