Can you please explain me why doesn't the run() method be executed after 't.start()'
class Order implements Runnable {
public void run() {
try { Thread.sleep(2000); } catch (Exception e) { }
System.out.print("in ");
}
public static void main(
String [] args) {
Thread t = new Thread(new Order());
t.start();
System.out.print("pre ");
try { t.join(); } catch (Exception e) { }
System.out.print("post ");
} }
Which two can result? (Choose two.)
in pre
pre in
in post pre
in pre post
pre in post --- ans when i run the above
pre post in