Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Setter Injection V/S Constructor Injection

 
Vaibhav G Garg
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would like to know when we should be using Setter Injection?


And, in which case, we should use Constructor Injection?
 
Tim Cooke
Sheriff
Pie
Posts: 2935
121
Clojure IntelliJ IDE Java
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic