티스토리 뷰

공부

[Java] List<Integer> -> int array[]

승가비 2021. 11. 5. 12:37
728x90
int[] array = list.stream().mapToInt(i -> i).toArray();

https://stackoverflow.com/questions/960431/how-to-convert-listinteger-to-int-in-java

 

How to convert List 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 to int[] in Java? I'm confused because List.toArray() actually

stackoverflow.com

 

728x90

'공부' 카테고리의 다른 글

[Google Spread Sheet] 환율  (0) 2021.11.05
[Java] Integer.MAX_VALUE & Integer.MIN_VALUE  (0) 2021.11.05
[Linux] File encoding  (0) 2021.11.05
[Java] JVM encoding  (0) 2021.11.05
[Java] RestTemplate timeout  (0) 2021.11.05
댓글