Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

public class Main {
    public static void main(String args[]) {

        Thread t = new Thread(new ThreadDemo());

        System.out.println("thread  = " + t);
        t.start();
    }
}

class ThreadDemo implements Runnable {
    public void run() {
        System.out.println("Inside run()function");
    }
}