fork download
  1. public class TestThreadTwice1 extends Thread{
  2. public void run(){
  3. System.out.println("running...");
  4. }
  5. public static void main(String args[]){
  6. TestThreadTwice1 t1=new TestThreadTwice1();
  7. t1.start();
  8. t1.start();
  9. }
  10. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:1: error: class TestThreadTwice1 is public, should be declared in a file named TestThreadTwice1.java
public class TestThreadTwice1 extends Thread{  
       ^
1 error
stdout
Standard output is empty