Hello everyone, I need help with my program. The program has to randomize the array indexs. I am having a huge issue with this:
import java.util.Random; //to generate random #'s
public class Array
{
public static void printIntArray(int[] myParamVar)
{
int LOCATION = 0;
while(LOCATION < myParamVar.length)
{
System.out.print("In LOCATION " + LOCATION + " ");
System.out.print("Susie has written ");
System.out.println(myParamVar[LOCATION]);
LOCATION = LOCATION + 1;
}
return;
}
public static void main (String[] args )
{
int[] myParamVar = {59, 39, 16, 10, -1};
int random = (int)(4.9999 * Math.random());
for(int i =0; i < myParamVar.length; i++)
{
}
System.out.println(myParamVar);
printIntArray(myParamVar);
}
}
It would be nice if someone point me into the right direction !!