import java.util.*; public class FindSmallest { public static void main (String[] argv) { // Fill an array with some random values - for testing. int[] testData = makeRandomArray (10); // Find largest and smallest elements. int smallest = findSmallest (testData); System.out.println ("Smallest=" + smallest); smallest = findSmallest2 (testData); System.out.println ("Smallest=" + smallest); } static int findSmallest (int[] A) { // Start by assuming first is smallest. int smallest = A[0]; // Check against A[1], A[2] ... etc. for (int i=1; i