Extend Thread Object

  new Thread("AnonymousThread") {
   @Override
   public void run() {
             try {
              while(true) {
               System.out.println("Thread running...");
              }
             } catch (Exception e) {}
   }
  }.start();

Extend Runnable

  new Thread(new Runnable() {
   public void run() {
             try {
              while(true) {
               System.out.println("Runnable running...");
              }
             } catch (Exception e) {}
   }
  }
  ).start();