0
Could someone explain me what the Dependency Injection Pattern is and how to refactor the following code?
public class Motor{
ICombustivel combustível;
public Motor(){
combustível = new Gasolina();
}
}
0
Could someone explain me what the Dependency Injection Pattern is and how to refactor the following code?
public class Motor{
ICombustivel combustível;
public Motor(){
combustível = new Gasolina();
}
}
Browser other questions tagged java pattern-design
You are not signed in. Login or sign up in order to post.
Related:What is addiction injection?
– user28595
Related: http://answall.com/q/21319/101.E http://answall.com/q/40806/101. With these I think the question may be duplicated.
– Maniero