Worker Thread in Java
<p>I need to read the data from a table every minute through thread &amp; then perform certain action. </p>

<p>Should I just start a thread &amp; put it in sleep mode for 1 minute, once the task is done. And then again check if the table has any data, perform the task again &amp; go to sleep for 1 minute...</p>

<p>Is this the right approach? Can any one provide me some sample code in Java for doing the same?</p>

<p>Thanks!</p>
