Sail E0 Webinar
Question
Which of these is an incorrect form of using method max() to obtain maximum element?
Options:
A .  max(Collection c)
B .  max(Collection c, Comparator comp)
C .  max(Comparator comp)
D .  max(List c)
Answer: Option C


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



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers