i'll tell you , when you write an interface, you must write a class that
implements all the methods of the interface, right??
now this class is going to have fields and methods that are not implemented
in other classes, right??
so when you make claas1 implements an interface that is implemented in
class2, you will have access threw class1 to class2 even without needing to
see or know the interface methods implementations in class 2, right?? the
abstract class doesn't provide these features because you can't implement an
abstract class, the interface may join classes which lay in different
packages and don't share any of there info ( fields and methods) i think
that is also right, if you have any thing in addition to discuss about it
will be my pleasure to serve.
yours.
On Wed, Sep 2, 2009 at 8:55 AM, vinay basavanal <[email protected]> wrote:

> i understand the concept of interface but my question is ,is it really
> necessary interface was introduced in order to avoid problems of multiple
> inheritance that is  a single class inheriting from two classes but
>
> only reason why  we go for inheritance is to get advantages of already
> implemented methods but with interface we don't get that advantages so why
> interface
>
> >
>


-- 
Abbas Zaini

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to