title: Code after TImer execution not working
body: <p>This is the code:  </p>
  
  <pre><code>public class Controller {
      NetworkDiscovery n;
      public static int discoveryInterval=2000;
  
      public static void main(String[] args) throws UnknownHostException{
          Timer t1=new Timer();
          t1.scheduleAtFixedRate(new NetworkDiscovery(), 2000, discoveryInterval);
          System.out.println("null");
      }
  }
  </code></pre>
  
  <p>Assuming that there is a class NetworkDiscovery which has a run() and everything on that works fine, the println() alone doesn't get executed. Why so?</p>
  
  <p>Is there another way to repeatedly perform an action in the background while other actions are performed too? </p>