If the class is final, there's a reason for, composition pattern is not a workaround to weaken/break classes design.
With composition you are using the object exactly as intended, not sure how it could weaken or break the class design.
He stated "..is extend the class by using composition" That's not extending anything. The reason of this post is so basic (shouldn't even exist), to include a misconception like that
I think what he means is that you can extend its functionality by composition.
I don't think the post shouldn't exist, at least one person appreciated it...
In general basic content is useful for beginners, we're not all at the same stage in our careers or paths.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
If the class is final, there's a reason for, composition pattern is not a workaround to weaken/break classes design.
With composition you are using the object exactly as intended, not sure how it could weaken or break the class design.
He stated "..is extend the class by using composition"
That's not extending anything.
The reason of this post is so basic (shouldn't even exist), to include a misconception like that
I think what he means is that you can extend its functionality by composition.
I don't think the post shouldn't exist, at least one person appreciated it...
In general basic content is useful for beginners, we're not all at the same stage in our careers or paths.