I have a function like this:
public static int partition(List list, ListElement elemL, ListElement elemR){
ListElement elemX;
...
elemR = elemX.next;
return x;
}
And at the end of the funktion the elemR is changed, but after calling the function from the main method the parameter elemR has still the same value like before the function call. What's the problem? How can i change this ListElement and "save" this change after the function is called without changing the return type to ListElement (i need the integer return value too)?