0 votes
in Education by (1.7m points)
Which of these methods can randomize all elements in a list?

(a) rand()

(b) randomize()

(c) shuffle()

(d) ambiguous()

I got this question by my college professor while I was bunking the class.

This intriguing question originated from Collection Algorithms topic in section 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 answer is (c) shuffle()

Easy explanation: shuffle – randomizes all the elements in a list.

Related questions

...