problem with remove method
<p>Hi
I have written this code which is like merge sort! when i want to remove an object in the <code>mergeForUpperHull</code> method , it doesn't do this (I want to remove element from upperHull list)
I mean I debug it and that it goes to this line : <code>if(b==true&amp;&amp;b0==true)
                list.remove(auxiliaryList.get(2));</code>but not removing !</p>

<p>also I will call the bellow method with <code>solve(upperHull);</code> and I want to remove objects from the <code>upperhull</code> list but it doesn't.
my code:</p>

<pre><code>private void solve(List&lt;Point&gt; upperHull) {
    list2 = upperHull;
    number = upperHull.size();
    dcHullForUpperHull(0, number - 1);
}

private void dcHullForUpperHull(int low, int high) {
    /*System.out.println(list);*/
    if (low&lt;high) {
        // Get the index of the Object which is in the middle
        int mid = (low + high) / 2;
        // Sort the left side of the list
        dcHullForUpperHull(low, mid);
        // Sort the Right side of the list
        dcHullForUpperHull(mid + 1, high);

        //combine them both.
        mergeForUpperHull(low, mid, high);
    }
}

private void mergeForUpperHull(int low, int mid, int high) {
    List&lt;Point&gt; auxiliaryList  = new ArrayList&lt;Point&gt;();
    List&lt;Point&gt; auxiliaryListTow = new ArrayList&lt;Point&gt;();
    for(int i =low;i&lt;=mid;i++){
        auxiliaryList.add(upperHull.get(i));
    }
    for(int i = mid+1;i&lt;=high;i++){
        auxiliaryListTow.add(upperHull.get(i));
    }
    if(auxiliaryList.size()==3 &amp;&amp; auxiliaryListTow.size()==2){
        boolean b = Determinate.isPointLeftSide(auxiliaryListTow.get(0),auxiliaryList.get(1),auxiliaryList.get(0));
        boolean b0 = Determinate.isPointRightSide(auxiliaryListTow.get(0),auxiliaryList.get(1),auxiliaryList.get(2)) ;
        if(b==true&amp;&amp;b0==true)
            list.remove(auxiliaryList.get(2));

         if(b!=true&amp;&amp;b0!=true)
             list.remove(auxiliaryList.get(1));
        }
</code></pre>
