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