3

In the abstract type List, how does it determine the argument is an index or element? For example, if a LinkedList calls remove(1), how does computer know whether it's removing the second element or the integer element with value 1?

Thank you!

Yibo Liu
  • 71
  • 6
  • LinkedList remove(int index) Removes the element at the specified position in this list. – Blasanka Jul 24 '17 at 03:55
  • 1
    @Blasanka There are two `remove` methods, and understanding which one gets called requires a little more knowledge of some Java's intricacies. It's not just a matter of reading the javadoc. – ajb Jul 24 '17 at 04:02

0 Answers0