No subject


Sat Nov 12 19:29:10 PST 2005


This is one of the advantages of getting rid of multiple inheritence (IMHO). If both A and B were abstract classes (as in C++, for examples) and init() was implemented implementation in both, then C.init() would have to provide some mechanism to decide which method got called. This can get messy quickly. Interfaces clean this up.

I hope this helps,

- Paul Philion

jguich wrote:
> 
> hi,
> 
>       suppose that:
> 
>       interface A declares void init();
>       interface B declares void init();
> 
>       if Class C implements A and B, who (A or B) is the 'owner' of init()?
> 
>                         TIA,
> 
>                                guich.



More information about the Advanced-java mailing list