Galera, segue uma questao que quero trocar uma ideia com vcs:
veleu…
Givem:
1. class Work implements Runnable {
2. Thread other;
3. Work(Thread other) { this.other = other; }
4. public void run() {
5. try { other.join(); } catch (Exception e) { }
6. System.out.print("after join ");
7. } }
8.
9. class Launch {
10. public static void main(String [] args) {
11. new Thread(new Work(Thread.currentThread())).start();
12. System.out.print("after start ");
13. } }
What is the result?
A) after join
B) after start
C) Compilation fails.
D) after join after start
E) after start after join
F) An exception is thrown at runtime.