The Executor framework separates the task creation and its execution. With it, you only have to implement the
Runnable objects and use an
Executor object. You send the
Runnable tasks to the executor and it creates, manages, and finalizes the necessary threads to execute those tasks.
Java 7 provides a special kind of executor in the Fork/Join framework. This framework is designed to solve those problems that can be broken into smaller tasks using the divide and conquer technique. Inside a task, you have to check the size of the problem you want to resolve and, if it's bigger than an established size, you divide the problem in two or more tasks and execute those tasks using the framework. If the ...