I was learning to use multi-threading by using the Runnable interface.
This is how i am trying to do it
public class ExampleClass implements Runnable {
public static void main(String[] args)
{
Thread object = new Thread(new ExampleClass());
object.start();
}
public void run(String[] args){
System.out.println("ExampleClass running");
}
}
However this doesn't work because my assumption is that the start method calls run() however since i have that method as run(String) in my example above, it doesn't work. The program compiles but then just exits.
Please can you advise what am I doing wrong?