Answers for "how to string to char array in java"

27

java string to char array

String str = "example";
char[] ch = str.toCharArray();
Posted by: Guest on March-05-2020
0

char array to string in java

// Method 1: Using String object
      char[] ch = {'g', 'o', 'o', 'd', ' ', 'm', 'o', 'r', 'n', 'i', 'n', 'g'};
      String str = new String(ch);
      System.out.println(str);
Posted by: Guest on June-02-2021

Code answers related to "how to string to char array in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language