import java.util.*;
public class part1
{
public static void main (String[] args)
{
int [] Mlist = {10, 8, 6, 11, 7};
// For i = n downto 2
for (int i = Mlist.length; i >= 2; --i)
{
// Find the position of the largest item in the sublist
// of the first i items from the list
int posBig = findPosBig( MList, i );
// Swap the largest item with the ith item; i.e. item at position i -1
swapArrayItems( MList, i-1, posBig );
}
}
-----------------------------------------------------------------------------------------------------------------------------------------------------
errors:
[netsurf@turrican week9]$ javac part1.java
part1.java:13: cannot find symbol
symbol : variable MList
location: class part1
int posBig = findPosBig( MList, i );
^
part1.java:15: cannot find symbol
symbol : variable MList
location: class part1
swapArrayItems( MList, i-1, posBig );
^
2 errors