 <p>Regular Threads can prevent the VM from terminating normally (i.e. by reaching the end of the main method - you are <em>not</em> using System#exit() in your example, which will terminate the VM as per documentation). </p> <p>For a thread to not prevent a regular VM termination, it must be declared a daemon thread via Thread#setDaemon(boolean) before starting the thread.</p> <p>In your example - the main thread dies when it reaches the end of it code (after t1.start();), and the VM - including t1- dies when t1 reaches the end of its code (after the while(true) aka never or when abnormally terminating.)</p> <p>Compare <a href="http://stackoverflow.com/questions/2213340/what-is-daemon-thread-in-java">this question</a>, this <a href="http://stackoverflow.com/a/22147006/958689">answer to another similar question</a> and the <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Thread.html" rel="nofollow">documentation</a>.</p>