Click here to Skip to main content
15,885,365 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to know the difference b/w interface and abstract class.
I know the difference that Interface can't have concrete methods but abstract class can have concrete methods.
Also one class can implement more then one interfaces while it can inherit only one abstract class.

What If I don't have to implement multiple inheritance, neither want to provide default behaviour or my behaviour is changing.
If have pure abstract class(i.e. without any concrete method) and I also have option of using interface, then what is the best to use and why??
Posted

Start here: Abstract Class versus Interface[^], then use Google ;)
 
Share this answer
 
Comments
Abhinav S 7-Aug-13 7:45am    
My 5. Nothing better than doing a search.
Maciej Los 7-Aug-13 7:52am    
Thank you, Abhinav ;)
Manas Bhardwaj 7-Aug-13 13:58pm    
Google is always correct :) +5!
Maciej Los 7-Aug-13 14:53pm    
Thank you, Manas ;)
There is tons of information available on the internet and on this site itself.
Try http://www.codeproject.com/search.aspx?q=interface+versus+abstract+class&x=0&y=0&sbo=kw&usfc=false[^].
 
Share this answer
 
Comments
Maciej Los 7-Aug-13 7:43am    
Short and to the point!
+5
Abhinav S 7-Aug-13 7:45am    
Thank you.
Manas Bhardwaj 7-Aug-13 13:57pm    
That's the way to solve a problem. +5!
Abhinav S 7-Aug-13 22:56pm    
Thank you.

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