Java Software Engineer Question:

Explain me what is association?

Tweet Share WhatsApp

Answer:

Association is a relationship where all object have their own lifecycle and there is no owner. Let’s take an example of Teacher and Student. Multiple students can associate with a single teacher and a single student can associate with multiple teachers but there is no ownership between the objects and both have their own lifecycle. These relationship can be one to one, One to many, many to one and many to many.

Download Java Software Engineer PDF Read All 45 Java Software Engineer Questions
Previous QuestionNext Question
Explain me what is method overloading and method overriding?int a = 1L;
won’t compile and int b = 0;
b += 1L;
compiles fine. Explain me why?