One approach to implementing a SortedList is through inheritance, creating a subclass of the List class then overriding the relevant methods to ensure that the List remains in sorted order. Which of the following inherited List methods MUST be overridden to ensure that sorted order is preserved?

add(newEntry), add(newPosition,newEntry), replace(givenPosition, newEntry)
  • clear(),remove(givenPosition), contains(anEntry)
  • add(newEntry), add(newPosition,newEntry), remove(givenPosition)
  • remove(givenPosition), replace(givenPosition, newEntry),clear()
  • add(newEntry), add(newPosition,newEntry),contains(anEntry)

There are no hints for this question