I'm trying to use an executor to write data to the bank using threads. When instantiating an Executor Service class object and retrieving an instance of Executors.newSingleThreadExecutor (); it returns the error that is not finding the instance / declaration of newSingleThreadExecutor.
ExecutorService exec = new Executors.newSingleThreadExecutor();
exec.execute(new Runnable() {
@Override
public void run() {
//Adicionando tarefa
addTask(itemList);
}
});