I am trying to create a program that takes a array of 7 random numbers from 1-10 and puts them in a array and prints it,but whenever I run it I get this same result [I@6d06d69c.
import java.util.Random;
public class DiversCalc {
public static void main(String[] args){
int[] myList = new int[7];
Random rand = new Random();
for (int positionInArray = 0; positionInArray < myList.length;
positionInArray++) {
int diverScore1 = rand.nextInt(10);
myList[positionInArray] = diverScore1;
}
System.out.println(myList);
}
}