Write a program in java to demonstrate user thread in using Indirect way?

class UserThread extends Thread

{

      public void run()

      {

            System.out.println("Task 1");

      }

}

class Indirect

{

      public static void main(String arg[])

      {

            UserThread x=new UserThread();

            x.start();

      }

}

Indirect.PNG

, , , , , ,

Leave a Reply