outprintf n 50s 15tOriginal intArrayList1 Assign

Outprintf n 50s 15toriginal intarraylist1 assign

This preview shows page 1 - 3 out of 3 pages.

System.out.printf ("\n%-50s"," 1.5.\tOriginal intArrayList1"); g.displayList(intArrayList1); //Assign unique values of intArrayList1 into intArrayListTemp1 ArrayList<Integer> intArrayListTemp1 = g.removeDuplicates(intArrayList1); //Display the unique values in intArrayList1 System.out.printf ("\n%-50s"," 2 \tUnique values in intArrayList1"); g.displayList(intArrayListTemp1); //Location of values in intArray2 System.out.printf ("\n%-50s%10d"," 3.1\tLocation of value 7 in intArray2:",g.linearSearch(intArray2,7)); System.out.printf ("\n%-50s%10d"," 3.2\tLocation of value 23 in intArray2:",g.linearSearch(intArray2,23)); //Use SelectionSort to Sort intArray1 g.selectionSort(intArray2); System.out.println ("\n 4.1.\tSorted intArray2 by Using Selection Sort"); g.displayList(intArray2);
Image of page 1
//Use Selection sort to Sort stringArray1 g.selectionSort(stringArray1); System.out.println ("\n 4.2.\tSorted stringArray1 by Using Selection Sort"); g.displayList(stringArray1); //Use Selection sort to Sort doubleArray1 g.selectionSort(doubleArray1); System.out.println ("\n 4.3.\tSorted doubleArray1 by Using Selection Sort"); g.displayList(doubleArray1);
Image of page 2
Image of page 3

You've reached the end of your free preview.

Want to read all 3 pages?

  • Fall '08
  • STAFF
  • Insertion Sort, In-place algorithm, new ArrayList

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture