So I wanna compute a covexhull but in the I want the right and left sets seperately. I cannot understand what Java is doint right here exactly. So I first call the hullset function for the right part and then put it in rightCov (at that point right set has 3 points). After that I can hullset for the left set . The problem is that even though I have "saved" the 3 points of the right set after the second call of the hullset,for the left set only,the variable rightCov takes all the 5 points of the covexhull without me using it again. The calls are below.
hullset(A, B, rightSet, covexHull);
ArrayList<Point> rightCov=covexHull;
hullset(A,B,leftSet, covexHull);