I have written a program that will load an array of 50 random integers ranging between 0 and 128. I am trying to print the array, with only 5 integers printed on each line. But, I can't seem to do it.
public static void printList(int len, int[] list){
for (int i = 0; i < len; i++) {
System.out.println(list[i]);
} // end for
} // end printList
I want the output to be only 5 integers to a line.