Java Software Engineer Question:

Download Job Interview Questions and Answers PDF

Explain me what is association?

Java Software Engineer Interview Question
Java Software Engineer Interview Question

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 Interview Questions And Answers PDF

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?