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 objects in oop?
Can enum be null?
What is the types of inheritance?
What is stream in oop?
What is oops?what is its use in software engineering?
Why do we use polymorphism?
explain sub-type and sub class? atleast u have differ it into 4 points?
What is debug class?what is trace class? What differences are between them? With examples.
What does and I oop and sksksk mean?
Can destructor be overloaded?
What are benefits of oop?
What does enum stand for?
What is the use of oops?
How do you define social class?
What is polymorphism explain its types?