I can mention a very important advantage of interfaces. suppose you are working with a team that each one of them are developing a subset of classes and you need to use that classes in your classes. In such a situation a project manager (or any responsible person ) can define standard interfaces and give it to you, so you know what method to use in your classes and it can be an standard among all developers that are working on that classes. Another example is JDBC. most of JDBC is consists of interfaces that you use in your database application. Any vendor who wants to offer its DBMS implements this interfaces and releases it. So every body can develope his or her database application regardless of DBMS.
Another famous example is Java EE in which you just work with interfaces and don't mind what application server you are using(off course standard activities that is defined in Java EE SDK) On Wed, Sep 2, 2009 at 5:40 PM, Ashok A V <[email protected]> wrote: > > Hii, > > May be these articles will help you : > > http://www.javaworld.com/javaworld/javaqa/2001-04/03-qa-0420-abstract.html > http://xahlee.org/java-a-day/interface.html > > Thanks, > Ashok AV > > On Wed, Sep 2, 2009 at 11:25 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 > > > > > > > > > > > -- > Victory belongs to the most persevering. > - Napoleon > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
