-
What is the output of this program?
public class Result
{
public static void main(String args[])
{
long start, end;
start = System.currentTimeMillis();
for (int k = 0; k < 10000000; k++);
end = System.currentTimeMillis();
System.out.print(end - start);
}
}
-
- 0
- 1
- 200
- 30
- System Dependent
Correct Option: E
end time is the time taken by loop to execute it can be any non zero value depending on the System.