How would you describe dependency injection?
Anónimo
I explained that dependency injection is when you pass an object into a class instead of having the class create it internally, for example, passing an Employee object into a PayrollProcessor class. This allows for better flexibility and testability. Despite giving a clear and accurate answer, the interviewer shook his head and didn’t seem to understand, likely due to a language barrier.