Java String valueOf(char[] data)Example
String class valueOf(char[] data) method example
String class valueOf(char[] data) method example. This example shows you how to use valueOf(char[] data) method.This method Returns the string representation of the char array argument.
Here is the code:-
/**
* @(#) ValueOf8string.java
*Program that Returns the string representation of the char array argument.
* @Version 01-May-2008
* @author Rose India Team
*/
public class ValueOf8string
{
public static void main(String args[])
{
//creating a new array
char[] arr = new char[] { 'R', 'O', 'S','E' };
// Returns the string representation of the char array argument.
System.out.println( String.valueOf(arr));
}
} |
null
|