Complete the executor

Report a typo

Complete the code so that it creates a proper Executor.

Java
public class PasswordConfig implements AsyncConfigurer {

    @Override
    public Executor __________() {
        ThreadPoolTaskExecutor taskExecutor = new ThreadPoolTaskExecutor();

        taskExecutor.setCorePoolSize(4);
        taskExecutor.setMaxPoolSize(4);
        taskExecutor.setQueueCapacity(50);
        taskExecutor.initialize();
    
        return taskExecutor;
    }
}
Kotlin
class PasswordConfig : AsyncConfigurer {
    fun __________(): Executor {
        val taskExecutor = ThreadPoolTaskExecutor()

        taskExecutor.apply {
            corePoolSize = 4
            maxPoolSize = 4
            queueCapacity = 50
            initialize()
        }

        return taskExecutor
    }
}
Select one option from the list
___

Create a free account to access the full topic