Thread: start : Thread « java.lang « Java by API

Thread: start

 * Output:
 *  run

class caller implements Runnable {
  String msg;

  public caller(String s) {
    msg = s;
    new Thread(this).start();

  public void run() {

public class MainClass {
  public static void main(String args[]) {
    new caller("Hello");

Related examples in the same category

2.Thread.NORM_PRIORITY Thread(Runnable target, String name)
7.Thread.enumerate(Thread[] tarray)
8.Thread: getStackTrace()
9.Thread: getThreadGroup()
10.Thread: getUncaughtExceptionHandler()
11.Thread: interrupt()
12.Thread: isAlive()
13.Thread: isDaemon()
14.Thread: join() (Using join() to wait for threads to finish)
15.Thread: run()
16.Thread: setDaemon(boolean b)
17.Thread: setDefaultUncaughtExceptionHandler(UncaughtExceptionHandler eh)
18.Threah.sleep(long millis)
19.Thread: setDaemon(boolean on)
20.Thread: setName(String name)
21.Thread: setPriority(int newPriority)
22.Thread: setUncaughtExceptionHandler(UncaughtExceptionHandler eh)
23.Thread: stop
24.implements UncaughtExceptionHandler