Menu Bar

Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Saturday, 10 December 2016

What is Executor Interface In Java ?

Interface Executor

All Known Subinterfaces:
ExecutorService, ScheduledExecutorService

All Known Implementing Classes:
AbstractExecutorService, ForkJoinPool, ScheduledThreadPoolExecutor, ThreadPoolExecutor

Declaration of Executor:
public interface Executor

An Executor is normally used instead of explicitly creating threads.For example, rather than invoking new Thread(new(RunnableTask())).start(); for each of a set of tasks, you might use:

Executor executor = anExecutor;
executor.execute(new RunnableTask1());
executor.execute(new RunnableTask2());

Executor executes submitted Runnable tasks. This interface provides a way of decoupling task submission from the mechanics of how each task will be run, including details of thread use, scheduling, etc.

Method Summary of Executor Interface:

Modifier and Method Name
Description
void execute(Runnable command)
Executes the given command at some time in the future.


      
Blog Author - Pushkar Khosla,
Software Developer by Profession with 3.0 Yrs of Experience , through this blog i'am sharing my industrial Java Knowledge to entire world. For any question or query any one can comment below or mail me at pushkar.itsitm52@gmail.com.

This blog is all about to learn Core Java ,Interview Programs and Coding tricks to polish your Java Knowledge. If you like the content of this blog please share this with your friends.



Share this Blog with yours Friends !!

No comments:

Post a Comment