Home / MCQ Bank / Computer
Computer Collections Framework In Java

What is the purpose of the `toArray()` method in the Java Collections Framework?

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option B • It converts a collection to an array

Related Computer Questions

Computer Operators Which type of copy is shown in the following python code? l1=[[10, 20], [30, 40], [50, 60]] ls=list(l1) ls [[10, 20], [30, 40], [50, 60]] What is a common method for parsing and extracting data from JSON responses in web scraping? What will be the output of the following C# code? interface i1 { void f1(); } interface i2 :i1 { void f2(); } public class maths :i2 { public void f2() { Console.WriteLine("fun2"); } public void f1() { Console.WriteLine("fun1"); } } class Program { static Void Main() { maths m = new maths(); m.f1(); m.f2(); } } How do you create a decorator that takes arguments?