Here you can find the source of charToString(char c)
Parameter | Description |
---|---|
c | non-zero char |
public static String charToString(char c)
//package com.java2s; //License from project: Apache License public class Main { /**// ww w . java2 s .c o m * convert a char to a string * @param c non-zero char * @return non-null non-empty strung */ public static String charToString(char c) { char[] item = { c }; return (new String(item)); } }