Errors implementing quicksort
<p>My code is below. It is a sorting method included in a project instead of bubblesort for efficiency of code. My problem is that I keep getting errors which are:</p>

<p><code>array required, but java.util.List&lt;Inpatient&gt; found</code></p>

<p>&amp;</p>

<p><code>QuickSort(java.util.List&lt;Inpatient&gt;,int,int) in UtilitiesInpatient cannot be applied to (int,int)</code></p>

<p>I've tried doing some research but a lot of algorithms vary a lot depending on string or integer sorting and also, research on the errors themselves were highly unhelpful. Many thanks for any help or tips! </p>

<pre><code>    public void QuickSort (List&lt;Inpatient&gt; inpatientArrayListIn, int first, int last) 
    {

        // Quick Sort

        List&lt;Inpatient&gt; pivotValue = new ArrayList&lt;Inpatient&gt;();
        List&lt;Inpatient&gt; lowerPointerValue = new ArrayList&lt;Inpatient&gt;();
        List&lt;Inpatient&gt; upperPointerValue = new ArrayList&lt;Inpatient&gt;();

        int pivotIndex = first;
        Inpatient tempPatient = (inpatientArrayListIn.get(pivotIndex));
        String pivot = tempPatient.getSurname();
        int upperPointer = first;
        int lowerPointer = last;

        while (upperPointer &lt; lowerPointer) {


            while ((inpatientArrayListIn.get(upperPointer).getSurname().compareToIgnoreCase(pivot) &lt;= 0) &amp;&amp; (upperPointer &lt; last)) {

                upperPointer++;

            }


            while (((inpatientArrayListIn.get(lowerPointer).getSurname()).compareToIgnoreCase(pivot) &gt; 0) &amp;&amp; (lowerPointer &gt; first)){

                lowerPointer--;

            }

            if (upperPointer &lt; lowerPointer) {

                for (int i = 0; i &lt;= inpatientArrayListIn.size(); i++) {

                    upperPointerValue[i] = ((inpatientArrayListIn.get(upperPointer)));
                    lowerPointerValue[i] = ((inpatientArrayListIn.get(lowerPointer)));

                }

              /*  defaultTable.removeRow (upperPointer);
                defaultTable.insertRow (upperPointer, lowerPointerValue);
                defaultTable.removeRow (lowerPointer);
                defaultTable.insertRow (lowerPointer, upperPointerValue);
                */
                ++upperPointer;
                --lowerPointer;

            }

        }

        if ((inpatientArrayListIn.get(lowerPointer).getSurname()).compareTo(pivot) &lt; 0) {

            for (int i = 0; i &lt;= inpatientArrayListIn.size(); i++) {

                pivotValue[i] = inpatientArrayListIn.get(pivotIndex);
                lowerPointerValue[i] = (inpatientArrayListIn.get(lowerPointer));

            }
            /*
            defaultTable.removeRow (pivotIndex);
            defaultTable.insertRow (pivotIndex, lowerPointerValue);
            defaultTable.removeRow (lowerPointer);
            defaultTable.insertRow (lowerPointer, pivotValue);
            */
        }

        // Value in lowerPointer is now the pivot

        if (first &lt; (lowerPointer-1)) 
        {

            QuickSort (first, (lowerPointer-1));

        }

        if ((lowerPointer+1) &lt; last) 
        {

            QuickSort ((lowerPointer+1), last);

        }

    }
</code></pre>
