what is the difference between containership and inheritence?
Answer Posted / sandeep choudhary
inheritance is the ability for a class to inherit of
properties and the behavior from a parent class by extending it.
while containership is the ability of a class to contain the
another objects as member data.
if a class is extended, it inherits all the public and
protected properties and the behaviors and those behavior
may be overridden by the sub class.but if a class is
contained in another, container class does not have the
ability to add and modify of contained.
| Is This Answer Correct ? | 47 Yes | 2 No |
Post New Answer View All Answers
What is the main feature of oop?
What are the features of oop?
Is html an oop?
What is abstraction in oops?
What are benefits of oop?
write string class as your own class in java without using any built-in function
Why do pointers exist?
How do you define a class in oop?
What is difference between polymorphism and inheritance?
Which is better struts or spring?
What is the difference between abstraction and polymorphism?
What is multilevel inheritance explain with example?
hi all..i want to know oops concepts clearly can any1 explain??
What is use of overloading?
Which language is not a true object oriented programming language?