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
What are the three main types of variables?
Where You Can Use Interface in your Project
What is new keyword in oops?
What is interface in oop?
any one please tell me the purpose of operator overloading
What does sksksk mean in text slang?
How to call a non virtual function in the derived class by using base class pointer
How is polymorphism achieved?
Why multiple inheritance is not allowed?
2. Give the different notations for the class.\
can we make game by using c
What is property in oops?
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.
What is the real life example of polymorphism?
What is the advantage of oop over procedural language?