How to convert List<Integer> to int[] in Java?

This is similar to this question: How to convert int[] to Integer[] in Java? I'm new to Java. How can i convert a List&lt;Integer&gt; to int[] in Java? I'm confused because List.toArray() actually