티스토리 뷰

공부

[Java] join comma by List<String>

승가비 2019. 6. 29. 23:57
728x90
List<String> ids = Arrays.asList("1","2","3");
String idsComma = ids.toString();
String idsComma = String.join(",", ids);

[출처] https://stackoverflow.com/questions/10850753/how-to-convert-a-liststring-into-a-comma-separated-string-without-iterating-li

728x90

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

[JS] shuffle  (0) 2019.06.30
[Java] String stream to Array  (0) 2019.06.30
[SQL] mutiple with  (0) 2019.06.29
if ... else VS switch ... case  (0) 2019.06.29
[SQL] null order by  (0) 2019.06.29
댓글