Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Java by (45k points)

Could someone tell me what is Has-a Relation in Java?

1 Answer

0 votes
by (99k points)

Java is a Programming Language that uses Association to establish a relation between objects. There are basically two types of Association, they are Composition and Aggregation. Composition in Java is often called as Has-a Relation, and implies that a class has a reference to an occasion of a similar class or of another class. If you wish to learn Java and want to get certified, check out the Java course from Intellipaat. And look at the following video on Java Interview Questions and Answers from our domain experts.

Browse Categories

...