What is the function of the indexOf(Object o) and the lastIndexOf(Object o) methods of the List interface?

What is the function of the indexOf(Object o) and the lastIndexOf(Object o) methods of the List interface?



Answer: indexOf() will return the integer position of the first occurance of o. lastIndexOf() will return the last occurance of o in the collection.


Learn More :

Data Structures

Learn More Multiple Choice Question :