Let us say that polymorphism can be satisfied with abstract classes
but first of all, you can implement many interfaces, but you can only
extend one abstrac class, then i am sure there are lots of other
reasons to justify the existence of interfaces.


On Jul 6, 11:45 am, Rohit Bansal <[email protected]> wrote:
> Thanks friend for your reply and I agree with you on the point there can be
> static methods in an abstract class and we can not have such in
> interface...I fully agree with your example too...
>
> Now just have a look at this code:
>
> interface Hello
> {
> void sayHello();
>
> }
>
> Now above code can be considered as abstract class or not..? Well I suppose
> Yes.
> That means..."*Every Interface can be FELT as abstract class [but never say
> so...]...but every abstract class can not be an Interface...*
>
> But then question is still before me What was the need for Interfaces to
> developers?
--~--~---------~--~----~------------~-------~--~----~
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