Answers for "convert character to string"

2

Convert char to string java

// Convert char to string java
public class CharToStringJava
{
   public static void main(String[] args)
   {
      char ch ='G';
      String str = Character.toString(ch);
      System.out.println("char to string is: " + str);
   }
}
Posted by: Guest on February-19-2021
0

java convert a char

char[] chars = { 'A', 'B', 'C', 'D', 'E', 'F' };

String str1 = String.valueOf(chars); //"ABCDEF"
String str2 = new String(chars);// "ABCDEF"

System.out.println(str1.equals(str2)); //"true"
Posted by: Guest on January-01-1970
0

convert char

char[] chars = {'a','b','c','d','e'};
string s = new string(chars);
Posted by: Guest on January-01-1970
0

convert char to string java

Character.toString('c');
Posted by: Guest on September-25-2021

Code answers related to "convert character to string"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language