more java help needed!
here is the brief
im not sure how to do it lol. im guessing i have to create an array at the beginning...
this is the code we were given to start with. its meant to print the list.
any ideas? the code doesnt need to be fancy at all.
here is the brief
im not sure how to do it lol. im guessing i have to create an array at the beginning...
this is the code we were given to start with. its meant to print the list.
Code:
public static void printList(int[] myArray, int next)
{
System.out.println("List follows: ");
for (int i=0; i < next; i++)
{
System.out.println(i+": "+ myArray[i]);
}
}
any ideas? the code doesnt need to be fancy at all.