title: Why setdaemon property is not ending the child thread when main thread has ended?
body: <p>I am running following peice of code to understand daemon threads concept and thread termination. the program keeps printing even after main method is done. Am I missing something here? </p>
  
  <pre><code>package threading;
  
  public class ThreadInterruption {
  
      public static void main(String[] args) {
          Thread t = new Thread(new RanThread());
          t.start();
          t.setDaemon(true);
          t.interrupt();
      }
  
  }
  
  class RanThread implements Runnable{
  
      @Override
      public void run() {
          int count=0;
          while(true) {
              System.out.println("Ha Ha Ha "+ count);
              count=count+1;
  
          }
  
      }
  
  
  }
  </code></pre>
  
  <p>Thanks in advance. </p>