MCQs
Total Questions : 16
| Page 2 of 2 pages
Answer: Option C. -> max(Comparator comp)
Its illegal to call max() only with comparator, we need to give the collection to be serched into.
Answer: Option B. -> fill()
fill()
Answer: Option C. -> singletonList()
singletonList() returns the object as an immutable List. This is a easy way to convert a single object into a list. This was added by Java 2.0.
Answer: Option B. -> unmodifiableCollection() method is available only for List and Set.
unmodifiableCollection() is available for al collections, Set, Map, List etc.
Answer: Option C. -> shuffle()
shuffle “ randomizes all the elements in a list.
Answer: Option D. -> All of the mentioned
All of the mentioned