728x90
String str = "1.1,2.2,3.3,4.4,5.5,6.6,7.7";

double[] doubleArray = Arrays.stream(str.split(",")).mapToDouble(Double::parseDouble).toArray();
Double[] DoubleArray = Arrays.stream(str.split(",")).map(Double::valueOf).toArray(Double[]::new);

 

728x90

'개발 지식 > Memo' 카테고리의 다른 글

REST API JunitTest(MockMvc)  (0) 2022.01.27
MockMvc Annotation 정리  (0) 2022.01.26
REST Controller 반환 타입 정리  (0) 2022.01.25
REST Annotation 정리  (0) 2022.01.25
String to Int Array (String -> int[]) 변경  (0) 2021.05.26
복사했습니다!