0 votes
in Education by (1.7m points)
Which of this method is used to make all elements of an equal to specified value?

(a) add()

(b) fill()

(c) all()

(d) set()

This question was posed to me in an international level competition.

My doubt is from Java.util in portion java.util – The Collections Framework of Java

Select the correct answer from above options

JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by (1.7m points)
Right choice is (b) fill()

For explanation: fill() method assigns a value to all the elements in an array, in other words, it fills the array with specified value.

Related questions

...