What is the differances between a abstract calss and
interface
Answer Posted / kanan
Abstract class: You can inherit only one class.
Interface: You can inherit more than one interface.
Abstract class: It contains both completed and uncompleted
(abstract) methods.
Interface: It only contains uncompleted methods (methods
without body).
Abstract class: Access modifiers are there for methods and
properties.
Interface: It does not have access modifier for methods or
properties. By default they are public.
Abstract class: Fast
Interface: Require more time to find actual method in classes.
Abstract class: It can contain fields and constants.
Interface: no fields can be defining in interface.
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Why is abstraction used?
What is overloading and its types?
write a program to enter a string like"sunil is a good boy and seeking for a job" not more than 10 characters including space in one line,rest characters should b in other line.if the next line starts from in between the previous word,then print whole word to next line.
Why is polymorphism used?
What exactly is polymorphism?
Where You Can Use Interface in your Project
What causes polymorphism?
can we make game by using c
Hi friends I have experience of 6 months in website design and maintanence. Now i am looking for other IT jobs.. to switch platform. please post any interview you know in chennai.
Why do we need polymorphism in c#?
What is abstract class in oops?
Why do pointers exist?
which feature are not hold visual basic of oop?
What is the significance of classes in oop?
Can we create object of interface?