×

Multiple-Choice Questions

Which Java method is used to clear element of ArrayList?

89. Which Java method is used to clear element of ArrayList?

  1. deleteAll()
  2. delete()
  3. clearAll()
  4. clear()

Answer: D) clear()

Explanation:

The clear() method of ArrayList in Java is used to remove all the elements from a list.

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.