Answers for "what is a callable in java"

0

what is a callable in java

public interface Runnable {
    public void run();
}
Posted by: Guest on May-14-2021
0

what is a callable in java

public class EventLoggingTask implements  Runnable{
    private Logger logger
      = LoggerFactory.getLogger(EventLoggingTask.class);

    @Override
    public void run() {
        logger.info("Message");
    }
}
Posted by: Guest on May-14-2021
0

what is a callable in java

public void executeTask() {
    executorService = Executors.newSingleThreadExecutor();
    Future future = executorService.submit(new EventLoggingTask());
    executorService.shutdown();
}
Posted by: Guest on May-14-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language