adspace
Answer Posted / Nikunj Kumar
Neither setter nor constructor injection is inherently better. The choice depends on the specific needs of the application and design preferences. Setter injection allows for easier configuration but can lead to looser coupling, while constructor injection promotes stronger coupling but enforces dependencies at object creation.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers