Home » JAVA Programming » Collections » Question
  1. Which of these is an incorrect form of using method max() to obtain a maximum element?
    1. max(List c)
    2. max(Comparator comp)
    3. max(Collection c)
    4. max(Collection c, Comparator comp)
    5. None of these
Correct Option: B

Its illegal to call max() only with comparator, we need to give the collection to be searched into.



Your comments will be displayed only after manual approval.