For example lets say I've create a single dimensional array and initiate the array to 100. If I want to be able to use all the values of the array, like in a for loop, how would I do it? I found two methods below but I'm not sure which approach is recommended. Also is there any differences at all?
int[] list = new int[100];
for (int i = 0; i < list.length; i++)
or
for (int i = 0; i < 100; i++)
Which of these two syntax is more commonly used?