I was looking at a project in java and found a for loop which was written like below:
for
for(int i=1; i
In an array, length is not a function as in List.size(). When you create an array in java, its length is a constant. So the cost is minimal
length
List.size()