fork(1) download
  1. public class Fabric extends Thread {
  2.  
  3. public static void main(String[] args) {
  4.  
  5. Thread t = new Thread(new Fabric());
  6.  
  7. Thread t2 = new Thread(new Fabric());
  8.  
  9. t.start();
  10.  
  11. t2.start();
  12.  
  13. public static void run() {
  14.  
  15. for(int i = 0; i < 2; i++)
  16.  
  17. System.out.print(Thread.currentTread().getName() + " ");
  18.  
  19. }
  20.  
  21. }
  22.  
  23.  
  24. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:13: error: illegal start of expression
	public static void run() {
	^
Main.java:13: error: illegal start of expression
	public static void run() {
	       ^
Main.java:13: error: ';' expected
	public static void run() {
	             ^
Main.java:13: error: ';' expected
	public static void run() {
	                        ^
4 errors
stdout
Standard output is empty