Files
  • Main.java
  • Main.class
  • Sorts.class
  • Sorts.java
Main.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
public class Main
{
//-----------------------------------------------------------------
// Creates an array of grades, sorts them, then prints them.
//-----------------------------------------------------------------
public static void main (String[] args)
{
int[] grades = {89, 94, 69, 80, 97, 85, 73, 91, 77, 85, 93};
Sorts.selectionSort (grades);
for (int index = 0; index < grades.length; index++)
System.out.print (grades[index] + " ");
}
}