Which Java method is used to add all of the specified elements to the specified collection?

90. Which Java method is used to add all of the specified elements to the specified collection?

  1. addValue()
  2. copy()
  3. cpy()
  4. addAll()

Answer: D) addAll()

Explanation:

The addAll() method of java.util.Collections class is used to add all of the specified elements to the specified collection.

Comments and Discussions!

Load comments ↻






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