hi guys ... let me know real time issues where it absract and interface will be used ... Since java denies multiple inheritance , so we will be using interface ... wher in the case trully speaking mul;tiplr inheritance we have neither implemented mtds but interfaces is noit like that .. class which implenmnts sud provide the defn then what is use Thx in advnace Gowtham firstname.lastname@example.org
Yes, thats one of the main benefits of OOP, polymorphism.
For instance, you can have an interface as:
now I may have many classes such as Ferrari, Porche etc.. which can benefit by using this public abstract method of the interface car w/o having to rewrite the method again and again. Also we can set some variables in the interface (which btw, are public static and final by default) and benefit by using them in various classes.
Hope this helps.
-Kiennjal [ March 30, 2005: Message edited by: kiennjal shah ]