Using Class Executors to Obtain an ExecutorService
The ExecutorService interface (of package java.util.concurrent
) extends Executor
and declares various methods for managing the life cycle of an Executor
. You obtain an ExecutorService
object by calling one of the static
methods declared in class Executors (of package java.util.concurrent
). We use interface ExecutorService
and a method of class Executors
in our example, which executes three tasks.
Get Java™ How To Program (Early Objects), Tenth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.