Java does not implement multiple inheritance. Interfaces are a way to have an Object having multiple behaviors.
Abstract class won't give you that facility. Moreover, Interfaces should be used only to define types (Refer Effective Java by Josh Bloch for discussion on Abstract classes vs Interfaces) 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/-/D52I5Y6cYTcJ. 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.
