Examveda

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

A. `clear()`

B. `removeAll()`

C. `erase()`

D. `purge()`

Answer: Option A


This Question Belongs to Java Program >> Collections Framework In Java

Join The Discussion

Related Questions on Collections Framework in java