I have an array created in a separate method that returns the array, and i want it to pass to another method that will "test" it. Im having issues getting the New method to accept the array along with how to invoke it.
Code:
public class Problem2
{
public static void main (String[]args )
{
welcome();
rollDie();
}//end main
public static void welcome()
{
System.out.println("Welcome to My game!");
}//end welcome
//Rolls a die 100 times then stores the result in an array.
public static int[] rollDie()
{
int[] dieRoll = new int[100];
for(int i=0;i<100;i++)
{
dieRoll[i]=(int) (Math.random()*6)+1;
}//end for
return dieRoll;
}//end roll die
public static void outputResults(int dieRoll[])
{
System.out.println(dieRoll);
}
}//end problem2