Online Java Compiler By
JavaTpoint.com
import java.util.LinkedList; import java.util.List; public class JavaListToArrayExample2 { public static void main(String[] args) { List
list = new LinkedList<>(); for (int i = 1; i <= 10; i++) { list.add(i); } Object[] a = list.toArray(); for (int i = 0; i
Output