@all thanks On Thu, Aug 23, 2012 at 6:08 PM, vaibhav shukla <[email protected]>wrote:
> Abstract class are used for Abstraction > Interface are used for Polymorphism > > On Thu, Aug 23, 2012 at 6:06 PM, Amit Tiwari <[email protected]>wrote: > >> With an abstract class, the subclass of that inheritance tree only can >> and should provide the definitions of the methods. With an interface, >> subclasses of different inheritance tree can also implement the same >> methods. Interface provides a way to separate out and group common behavior >> of different inheritance trees. It is kind of a substitute for the multiple >> inheritance that some other languages provide. >> >> On Thu, Aug 23, 2012 at 4:59 PM, kings <[email protected]> wrote: >> >>> Dear sulekha, >>> >>> when u want a default property to get embedded ie u want to force any >>> feature use abstract. >>> when u want an additional feature need to be added used interface. >>> >>> ex: >>> For a car the default things are steering, engine, etc... if u want the >>> car to compulsory to have A/c then add it in the abstract >>> for a car having ABS is optional include it as an interface where ever u >>> think its necessary. >>> >>> >>> On Tuesday, 21 August 2012 21:20:45 UTC+5:30, sulekha .m wrote: >>> >>>> >>>> hi all, >>>> why do we separately need interfaces in java?? we can declare all >>>> the methods in abstract class as abstract this serves the purpose,then why >>>> do we have interfaces??? >>>> -- >>>> sulekha metta >>>> B.E computer science >>>> osmania university >>>> >>>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Algorithm Geeks" group. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msg/algogeeks/-/qI3YhsGoh7wJ. >>> >>> 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/algogeeks?hl=en. >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> 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/algogeeks?hl=en. >> > > > > -- > best wishes!! > Vaibhav > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > 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/algogeeks?hl=en. > -- sulekha metta B.E computer science osmania university -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. 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/algogeeks?hl=en.
