What is a thread pool in Java?
A thread pool is a set of threads that are created at the beginning of the program and never released, even after the tasks are completed.
Thatâ€™s partially correct. A thread pool does manage a set of threads, but it can also release idle threads depending on the pool type and configuration.
Can you describe how a thread pool can dynamically adjust the number of threads based on demand?