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 is a managed code is dim fs as filestreamobject is a managed code? : .NET Architecture
Explain the race around condition? : Dot net architecture
what is the difference between master page and content page?
I can't be bothered with cas. Can I turn it off?
What is cookie less session?
What is the procedure on hardware that converts the ascii value to binary? : .NET Architecture
What is msil, and why should my developers need an appreciation of it if at all?
Explain about cookie less session state? : .NET Architecture
What is .net viewstate?
What is the difference between an application and a program?
Explain 'managed' mean in the .NET context
Explain how to develop mobile applications using microsoft mobile internet toolkit (mmit) or .net mobile? : Microsoft dot net mobile
Which software is used for .net programming?
Can I create my own context attributes?
Explain the race around condition? How can it be overcome? : Dot net architecture