public
static String valueOf(char[] data)
Returns
the string representation of the char array argument.
class StringValueOfCharArray{ public static void main(String args[]){ char arr[] = {'d', 'e', 'f'}; String str1 = String.valueOf(arr); System.out.println("str1 = " + str1); } }
Output
str1 = def
No comments:
Post a Comment