Answers for "how to make string in char Array in java"

1

java put a char array into a string

char[] arr = { 'p'," ",'q', 'r', 's' };
      String str = String.valueOf(arr);
      System.out.println(str);//"p qrs"
Posted by: Guest on March-20-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 make string in char Array in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language