Java Multi-Threading Question:
Download Questions PDF

What is Thread leak?

Java Multi-Threading Interview Question
Java Multi-Threading Interview Question

Answer:

Thread leak is when application does not release references of the thread object and those threads do not get garbage collected.
Number of such unused threads increases with time and it can cause issues in the application like long response time.

To overcome this problem we can do the following

1. By maintaining a log for all entry and exit point of thread.
2. Check how the new thread is created and how it is closed.
3. By using exception handling etc.

Download Java Multi-Threading Interview Questions And Answers PDF

Previous QuestionNext Question
What is daemon thread and how it differs from user thread?Explain the method of Thread class with example?