I recently attended an interview and they asked me the question \"Why Interfaces are preferred over Abstract classes?\"
I tried giving a few answers like:
They asked me take any of the JDBC api that you use. "Why are they Interfaces?".
My answer to this specific question is :
SUN doesnt know how to implement them or what to put in the implementation. Its up to the service providers/db vendors to put their logic into the implementation.
The JDBC design has relationship with the Bridge pattern, which says "Decouple an abstraction from its implementation so that the two can vary independently".
That means JDBC api's interfaces hierarchy can be evolved irrespective of the implementation hierarchy that a jdbc vendor provides or uses.