When I run the code with the test scores: 71, 100, 98, 74, and 87, this is the output I get:
The test scores you entered, in descending order, are: [I@1a17589 The average is 86.
Why is my output for the selectionSort method not printing out correctly?
import java.util.Scanner;
/**
 * The Average class calculates the average of the test 
 * scores entered and puts the scores into descending order.
 */
public class Average
{
  private int[] data;
  public Average(int[] dataParam) 
  {
    data=dataParam;
  }
    public int calculateMean()
 {
   int total = 0;
   int mean;
    for (int index = 0; index < data.length; index++)
      total += data[index];
   mean = total / data.length;
   return mean;
 }
 public int[] selectionSort()
 {
   int startScan, index, minIndex, minValue;
    for (startScan = 0; startScan < (data.length-1); startScan++)
    {
      minIndex = startScan;
      minValue = data[startScan];
      for(index = startScan + 1; index < data.length; index++)
      {
        if (data[index] < minValue)
        {
          minValue = data[index];
          minIndex = index;
        }
      }
      data[minIndex] = data[startScan];
      data[startScan] = minValue;
    }
    return data;
 }
}
import java.util.Scanner;
public class AverageDriver
{
  public static void main(String[] args)
  {
   int[] data = new int[5];
    Scanner keyboard = new Scanner(System.in);
    for (int index = 0; index < data.length; index++) 
    {
      System.out.println("Enter score #" + (index + 1) + ": ");
      data[index] = keyboard.nextInt();
    }
    Average object = new Average(data);
   System.out.println("The test scores you entered, in descending order, are: ");
   System.out.println(object.selectionSort());
   System.out.println("The average is " + object.calculateMean() +".");
  }
}
 
    