How inheritance is different from aggregation in Java?

When a subclass inherits from a subclass, it typically inherits both the implementation and the interface. This, in turn, means that you’re forced to accept both as constraints on your class. With aggregation, you get to choose either implementation or interface, or both — but you’re not forced into either .6 Kas 2008

Sizin İçin Seçtik  What is environment variable in Python?

Leave a Reply

Your email address will not be published. Required fields are marked *