Dynamic method selection is so confusing! #
ListSet::remove have that given line? #
As mentioned in the comment, the reason that we need the line is out of scope.
List interface has two
remove(int index), that removes an element at a specific index
remove(Object elem), that removes a specific thing from the list
We would like to use the latter, so we must “autobox” the given
Integer with the given assignment statement.
Do we have to handle inputs outside [0,
maxElem] (inclusive)? #