How does List <Integer> in Java distinguish between element and index when an integer is passed?

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

Thank!

+3


source to share





All Articles