+ 2
About java source code
ArrayList.set(index,element) public E set(int index,E element) { rangeCheck(index); E oldValue = elementDate(index); elementDate[index] = element; return oldValue; } Why does it need to return oldValue?
1 Answer
+ 1
Because the return type isnât void