LeetCode Question · Jun 2017

What is the difference between inheritance, composition, aggregation, and association?

3 upvotes 2,980 views 2 replies

Question Details

Question: What is the difference between inheritance and composition? Answer: Composition is used to represent a HAS A relationship. Inheritance is used to represent a IS A relationship. For example, in Java: class Name {}...

Full Details

🔒

Unlock full leaked content

Full insider details, leaked discussions, and candidate experiences.

Get Premium →

Topics

Coding