So what's dependency injection?
Consider this situation, a class named EmployeeList which reads a list of employee names from files
public class Employee {
...
List<Employee> getEmployeesJoinedAfterYear(int year) {
String content = readFromFile("employees.txt");
...
blog.commitbyte.com4 min read