Sagot :
Answer:
allows you to reuse code without modeling
Explanation:
The main reason to use composition is that it allows you to reuse code without modeling an is-a association as you do by using inheritance. That allows stronger encapsulation and makes your code easier to maintain as Joshua Bloch explains in the 3rd edition of his book Effective Java.
#BrainlyEveryday