public class TestThreadTwice1 extends Thread{ public void run(){ System.out.println("running..."); } public static void main(String args[]){ TestThreadTwice1 t1=new TestThreadTwice1(); t1.start(); t1.start(); } }
Standard input is empty
Main.java:1: error: class TestThreadTwice1 is public, should be declared in a file named TestThreadTwice1.java public class TestThreadTwice1 extends Thread{ ^ 1 error
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!