Hi,
What is the difference between an Abstract class and an Interface?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Santhosh Kumar JayaramanPosted Oct 22, 2012, 3:16 AM
Santhosh Kumar JayaramanPosted Oct 22, 2012, 3:17 AM
Roopa LingayathPosted Oct 22, 2012, 3:17 AM
Roopa LingayathPosted Oct 22, 2012, 3:15 AM
Santhosh Kumar JayaramanPosted Oct 22, 2012, 3:14 AM
but with interfaces, you can inherit a child class from multiple interfaces.
Also it provides uniformity and standardization of methods.
Check this for real time example.
http://www.shubho.net/2010/08/what-is-interface-why-should-you-use.html
Roopa LingayathPosted Oct 22, 2012, 3:10 AM
Santhosh Kumar JayaramanPosted Oct 22, 2012, 2:38 AM
public abstract class myclass
{
void getNames();
void Getdetails()
{
//do something;
}
public interface IVehicle
{
void getNames();
void Getdetails();
}
One more is you can provide access specifier for the methods in abstract class but you cant specify any for interface methods, not even public.