What is thread pool in Java? Explain with a scenario and code.

Answer includes thread pool in java with concept and one simple scenario example and program, where thread pool can be used. Answer: Thread pool is collection of multiple threads that is used to performed large number of tasks simultaneously. Tried to include multiple scenarios for better understating and answering the concept with one scenario is … Read more What is thread pool in Java? Explain with a scenario and code.