Extension vs defender methods

"Zdeněk Troníček" tronicek at fit.cvut.cz
Tue Nov 15 05:49:27 PST 2011


Not always are interfaces intended to be implemented. Sometimes they just
define a contract. E.g. in JDBC, Connection is not there so that an
application programmer implements it.

Z.T.
-- 
Zdenek Tronicek
FIT CTU in Prague


Neal Gafter napsal(a):
> Both interfaces and abstract classes define contracts.  Both are intended
> to be subtyped.
>
> 2011/11/14 "Zdeněk Troníček" <tronicek at fit.cvut.cz>
>
>> In addition, they are different on purpose. Interfaces define contracts
>> and abstract classes are classes that are intended to be subclassed.
>>
>> Z.T.
>> --
>> Zdenek Tronicek
>> FIT CTU in Prague
>>
>>
>> Neal Gafter napsal(a):
>> > On Sun, Nov 13, 2011 at 1:08 AM, Llewellyn Falco
>> > <isidore at setgame.com>wrote:
>> >
>> >> the "standard" naming for interfaces w/non-abstract methods is: "an
>> >> abstract class"
>> >>
>> >
>> > Abstract classes (but not interfaces) may have state, and interfaces
>> (but
>> > not abstract classes) may be multiply inherited.  So they are not the
>> same
>> > thing.
>> >
>> >
>>
>>
>>
>



More information about the lambda-dev mailing list