른록노트

[Java] Convert ArrayList<String> to String[] array 본문

Programming/[Java]

[Java] Convert ArrayList<String> to String[] array

른록 2018. 10. 8. 09:52

@ 방법


ArrayList<String> list = new ArrayList<>();

list.add("테스트");


String[] arr = list.toArray(new String[list.size()]);


참고사이트

https://stackoverflow.com/questions/5374311/convert-arrayliststring-to-string-array

반응형
Comments