Multiple choice technology programming languages

What is the List interface?

  1. The Set interface

  2. list stores elements in an ordered way but may contain duplicate elements

  3. List interface provides support for ordered collections of objects.

  4. All of the above

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The List interface in Java represents an ordered collection (or sequence) of elements that permits duplicates. The correct option accurately describes its support for ordered collections. Comparing List to Set is wrong since Set does not allow duplicates, meaning the 'All of the above' option is incorrect.