Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

3. The method indexOf, part of the List interface, returns the index of the first occurrence of an object in a List. What does the following code fragment do?

int indexOfSam = myList.indexOf("Sam"); 
ListIterator<String> iteratorToSam = myListlistIterator(indexOfSam); 
iteratorToSam.previous(); 
iteratorToSam.remove(); 
 
PREVIOUS NEXT
Tagged: #The #method #part #List #returns #index #occurrence #object #What #code #fragment
ADD COMMENT
Topic
Name
5+2 =