what is a thread pool in java and why is it used?
Answer / Avneesh Kumar
A thread pool in Java is a collection of worker threads that can be reused to execute tasks concurrently. By using a thread pool, you can manage the number of threads actively executing tasks at any given time, preventing the creation and destruction of too many threads. This helps reduce the overhead associated with creating new threads, improves performance by minimizing context switching, and promotes efficient resource utilization.
| Is This Answer Correct ? | 0 Yes | 0 No |
What are the loops in java?
When a thread is executing a synchronized method , then is it possible for the same thread to access other synchronized methods of an object ?
Tell me about different OOPS concepts.
Why java is not a pure object oriented language?
why we need this (1.object,2.class,3.data hiding,4.encapsulation,5.abstraction,6. polymorphism,7.inheritance)
what is difference between prepare stetement and callable starement with example?
What is string pool?
What is the common usage of serialization? What exceptions occur during serialization?
Explain the difference between an Interface and an Abstract class?
how can u handle run time exception in java? explain with brief explanation with examples?
What are different types of multitasking?
How does finally block differ from finalize() method?