Vidyalelo
Java Programming · Q25

Java Collections Framework

Programming · Java Programming · question 25

Q25

Which method is used to remove all elements from a collection in the Java Collections Framework?

A.
`clear()`
Answer
B.
`removeAll()`
C.
`erase()`
D.
`purge()`

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board