Is there any way to start thread with out extending Thread class and implementing Run
Is there any way to start a thread without extending class Thread and implementing Runnable interface.
For eg. Consider the code below:
public static void main(String arg)
Thread t = new Thread();
public void run()
System.out.println("in run of main");
System.out.println("t thread exiting");
The code above neither extends Thread class or nor implements Runnable interface, even then i am able to create a thread but when i call start() method
the run() is not getting called as i haven't provided the target.
Is there any way to get this work without using Runnable or Extending Thread?
Last Post: 03-15-2006, 07:06 AM
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center