Which of these is true about unmodifiableCollection() method?
A. unmodifiableCollection() returns a collection that cannot be modified.
B. unmodifiableCollection() method is available only for List and Set.
C. unmodifiableCollection() is defined in Collection class.
D. None of the mentioned.
Answer:A
Which of these is true about unmodifiableCollection() method?
A. unmodifiableCollection() returns a collection that cannot be modified. B. unmodifiableCollection() method is available only for List and Set. C. unmodifiableCollection() is defined in Collection class. D. None of the mentioned.
Explanation: unmodifiableCollection() is available for al collections, Set, Map, List etc.