Difference between abstract class and interface
Answer Posted / sunita
1) abstract classes may contain one or more abstract methods(methods that can't be instantiated). on the other hand interface should contain only abstract methods.
2) abstract classes may implement some of its methods that are not abstract. but interface can't implement any of its method becoz al its methods are abstract.
3)in interfaces all the methods are implicitly abstract,final,static so these modifiers can b omitted but this nit the case wid abstract classes.
4)an important point to note about abstract classes is: they can be subclassed,this sub class implement all the abstract methods that are declared in abstract class.
interfaces provide an alternative to multiple inheritance becoz a class can implement more than one interface.
but an abstract can b sub classed only once.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the types of application software?
Explain about appdomains?
Explain how does .net mobile work? : Microsoft dot net mobile
can u give me real example of how web.config overrides the machine.config file?
How can I write my own .NET host?
IS IT Possible to inherit the AJAX page from child class which(child) is inherit from page class.Because i should apply some security in child class
How to improve the cache performance? : Dot net architecture
What is the importance of updatepanel control?
What are the options provived by vss to the user? how it will help us while delevoping application?
I want to create a project like google maps how can we do that with atlas?
8. Oop-Why and were we use Interfacse and Abstract class.
What is the difference between absolute expiration and sliding-time expiration?
Explain how to develop mobile applications using microsoft mobile internet toolkit (mmit) or .net mobile? : Microsoft dot net mobile
Why only boxed types can be unboxed?
Why am I getting an invalidoperationexception when I serialize an arraylist?