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[]) {
        new ThreadDemo();
    }

}

class ThreadDemo implements Runnable {

    ThreadDemo() {

        Thread t = new Thread(this);
        t.start();
        ClassLoader c = t.getContextClassLoader();
        // sets the context ClassLoader for this Thread
        t.setContextClassLoader(c);
        System.out.println("Class = " + c.getClass());
        System.out.println("Parent = " + c.getParent());
    }

    public void run() {

    }

}