Answers for "convert char to character java"

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

how to convert a string to char in java

String s = "a";
char c = s.charAt("0");
Posted by: Guest on June-05-2021

Code answers related to "convert char to character java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language