Java - 배열을 문자열로 합치기
배열을 문자열로 합치는 방법 기본 String[] color = {"red", "bule", "green", "orange", "yellow"}; String joinString = String.join(", ", color); List 타입 List color = List.of("red", "bule", "green", "orange", "yellow") String joinString = String.join(", ", color); 실행결과 : red, bule, green, orange, yellow Arrays.toString String[] color = {"red", "bule", "green", "orange", "yellow"}; String str = Arrays.toString(com..
2023. 2. 3.