Hi, nothing wrong with my code. I'm just asking to clarify about something.
public static void printList(List<Integer> list) {
for (Integer x: list) System.out.println(x);
//write your code here
}
Is my understanding of the 2nd line as: "for every Integer x in the list, print x in every new line", correct?
And if you have more information about the function of colons in general in Java, please also tell me.
Any help will be appreciated, thanks.