Multi Threading

© examsiri.com
Question : 33 of 44
 
Marks: +1, -0
Given the following
1. class Test {
2.   public static void main(String [] args) {
3.    printAll(args);
4.   }
5.   public static void printAll(String[] lines) {
6.    for(int i=0;i < lines.length; i++){
7.     System.out.println(lines[i]);
8.     Thread.currentThread().sleep(1000);
9.    }
10.  }
11. }

The static method Thread.currentThread() returns a reference to the currently executingThread object. What is the result of this code?
Go to Question: