java/method 정리

valueOf()

일상코더 2022. 9. 27. 22:05

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);
}