Java Char to String charToString(char c)

Here you can find the source of charToString(char c)

Description

convert a char to a string

License

Apache License

Parameter

Parameter Description
c non-zero char

Return

non-null non-empty strung

Declaration

public static String charToString(char c) 

Method Source Code

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

Related

  1. charToString(char ch)
  2. charToString(char[] values)
  3. charToString(final char value)