Tilmeld dig vores faglige nyhedsbrev
Givet følgende kode:
public static void main(String[] args) { final Thread t3 = new Thread(){ public void run(){ System.out.print("t3 done "); } }; Thread t4 = new Thread(){ public void run(){ try { t3.sleep(2000); } catch (InterruptedException e) { e.printStackTrace(); } System.out.print("t4 done "); } }; t4.start(); t3.start();}
Hvad bliver højst sandsynligt printet når main kører?