hey, i was reading an article about dependency injection and it says:

"Dependency Injection has several important benefits: For example

-Because components don't need to look up collaborators at runtime, they're much simpler to write and maintain.....

- A good IoC implementation preserves strong typing, If you need to use a generic factory to look up collaborators, you have to cast the results to the desired type....

Could someone please explain what collaborators are, or give me some good references to read regarding them? Haven't really found any good explanation through google.

I read this post which in some guy replied that

"For you and me, collaborators are people who work with us. For objects in a program, they are other objects which work with them"

So does that mean, in this example, the collaborators of the object Rocket are the Engine object eng and the Fuel object fuel?


Java Code:
public class rocket {
 
     private Engine eng;
     private Fuel fuel;
  
 
public rocket(Engine eng, Fuel fuel) {
 
     this.eng = eng;
     this.fuel = fuel;
}
}

Thanks