Program keep running after terminating
<p>I am writing a code in Java to run a task every 10 sec. However, when I stop the program from netbeans, it's still keep running</p>

<pre><code>while(true)

{
....
Thread.sleep(10000);
}
</code></pre>