fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class A extends Thread{
  9. public void run()
  10. {
  11. System.out.println("7788");
  12. System.out.println("77 88");
  13. }
  14. }
  15. class Ideone
  16. {
  17. public static void main (String[] args) throws java.lang.Exception
  18. {
  19. Thread t1=new A();
  20. Thread t2=new A();
  21. t1.start();
  22. t2.start();// your code goes here
  23. }
  24. }
Runtime error #stdin #stdout #stderr 0.05s 4452352KB
stdin
Standard input is empty
stdout
7788
77 88
stderr
Exception in thread "main" java.lang.OutOfMemoryError: unable to create new native thread
	at java.lang.Thread.start0(Native Method)
	at java.lang.Thread.start(Thread.java:714)
	at Ideone.main(Main.java:22)