Imagine that you need to write a Spring application that processes some tasks.
Here is a template for this application.
Java
// 1
class TaskWorker {
private final TasksQueue tasks;
TaskWorker(/* 2 */ TasksQueue tasks) {
this.tasks = tasks;
}
}
// 3
class TasksQueue {
private final List<String> tasks = List.of();
}
Kotlin
// 1
class TaskWorker(
/* 2 */ private val tasks: TasksQueue
) {}
// 3
class TasksQueue {
private val tasks = listOf<String>()
}
Select all the options that can be put instead of 1, 2, 3 to make this code work using the dependency injection mechanism.