Forward and Backward For loop - Java Quiz Question


Given the same system performance, which of the following for loops execute faster?

X: for(int i = 100000; i > 0; i--)
    {
    }
Y: for(int i = 1; i < 100001; i++)
    {
    }


A
Y executes faster than X
B
X executes faster than Y
C
Both will execute in same time
D
Can not be predicted