Home »
MCQs »
Java MCQs
Which Java method is used to clear element of ArrayList?
89. Which Java method is used to clear element of ArrayList?
- deleteAll()
- delete()
- clearAll()
- clear()
Answer: D) clear()
Explanation:
The clear() method of ArrayList in Java is used to remove all the elements from a list.