Click here to Skip to main content
15,894,405 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

we can use abstract class instead of interface. abstract class have abstract and non abstract methods are available. why we need interface. You can say like implement multiple interface in single class. we can have single abstract class and inherit to another class.
please explain me clearly with example.
Posted
Comments
Tomas Takac 31-Mar-15 3:13am    
You can implement multiple interfaces but you can only inherit from one class.
Maciej Los 31-Mar-15 3:23am    
Very interesting discussion: http://stackoverflow.com/questions/761194/interface-vs-abstract-class-general-oo
CPallini 31-Mar-15 4:11am    
Beacuse abstract class is not enough abstract (or, put in another way, interfaces are sexy).
Rajeev Jayaram 31-Mar-15 5:07am    
Well said :-)
Maciej Los 31-Mar-15 6:33am    
:laugh:
The best answer i've ever seen ;)

1 solution

 
Share this answer
 
v2
Comments
CPallini 31-Mar-15 3:50am    
5.
Maciej Los 31-Mar-15 6:32am    
Thank you, Carlo ;)
King Fisher 31-Mar-15 4:01am    
good one ;)
Maciej Los 31-Mar-15 6:32am    
Thank you, King ;)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900