Java/J2EE interview questions: - What is need of working thread?

Published on by javainterviewseries

One can start answering this Java/J2EE interview questions as follows: -

  • In working thread scheme, allocates one thread to execute one task.
  • When the task is complete, the thread may return to a thread pool for later use. In this scheme a thread may execute arbitrary tasks, which are passed in the form of a Runnable method argument, typically execute().
  • The runnable tasks are usually stored in a queue until a thread host is available to run them.
  • The worker thread design pattern is usually used to handle many concurrent tasks where it is not important which finishes first and no single task needs to be coordinated with another. The task queue controls how many threads run concurrently to improve the overall performance of the system. However, a worker thread framework requires relatively complex programming to set up, so should not be used where simpler threading techniques can achieve similar results.

View the following video on tiles integration with Struts 2: -


Know more on Java interview questions


Get more on Java interview questions from author’s blog

To be informed of the latest articles, subscribe:
Comment on this post

online jobs 10/19/2012 08:55

Nice post . keep up the good work

web development company 05/01/2012 07:49

i really appreciate it!!

collaboration solutions 11/11/2011 07:45

Blog very attractive. Congratulations!