+ 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 Resposta
+ 1
Because the return type isn’t void