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
how to set the startup position of the form?
What's the difference between an application and a program?
Explain the Lapsed Listener problem in .net
what is the difference between running an application with and without debugger?
What is .net viewstate?
define cache memory? : Dot net architecture
what is sessions and cookies take one example simple way to understand
What is one way operation?
8. Oop-Why and were we use Interfacse and Abstract class.
What other than biginteger has been introduced in system.numerics namespace?
Can I create my own permission set?
Can you explain server controls in atlas?
What is MS chart control in visual studio?
What is the purpose of hard disk? : Dot net architecture
What is .net mobile input validation. : Microsoft dot net mobile