Fork/Join Framework in Java

I come to know about Java added a new feature Fork and Join from version 7 on wards. And It is designed for work that can be broken into smaller pieces recursively. Can some one explain me about basic principles,behavior and the benefit to use Fork/Join in our real time applications?


Basically the Fork-Join breaks the task at hand into mini-tasksuntil the mini-task is simple enough that it can be solved without further breakups. ItÂ’s like a divide-and-conquer algorithm. One important concept to note in this framework is that ideally no worker thread is idle. They implement a work-stealing algorithmin that idle workers steal the work from those workers who are busy.

To know more about this please see the blog

Or else you can find the complete details from

Which help you to understand more on parallel processing of the task inside a method or function.

Answer is