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
Describe the advantages of writing a managed code application instead of unmanaged one. What is involved in certain piece of code being managed?
What size is a .net object?
define cache memory? : Dot net architecture
i wish to write mcts(microsoft certified technology specialist) exam. can anyone give the model question or format and preparation method?
Can you explain update progress control?
Explain the Lapsed Listener problem in .net
What are bindings?
where should I put this information then?
Explain dma? : .NET Architecture
What is the difference between metadata and menifest ?
Explain hard disk and what is its purpose? : Dot net architecture
What is the .net class that allows the retrieval of a data element using a unique key?
How do I stop a thread?
Explain Singleton design pattern in .net
Explain dotnet framework ?