본문 바로가기
java/method 정리

valueOf()

by 일상코더 2022. 9. 27.

Returns the string representation of the {@code char} array
argument. The contents of the character array are copied; subsequent
modification of the character array does not affect the returned
string.

param :   data - the character array. // 매개변수 문자배열
return : a {@code String} that contains the characters of the
         character array. //문자배열의 문자들로 구성된 문자열

public static String valueOf(char data[]) //문자 배열을 다시 String 문자열로 변환{
    return new String(data);
}

'java > method 정리' 카테고리의 다른 글

isAlphabetic()  (0) 2022.09.28
indexOf()  (0) 2022.09.27
toCharArray()  (0) 2022.09.27
charAt()  (0) 2022.09.27

댓글