Answers for "intialize char array with string java"

2

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

how to put string in char array in java tutorialspoint

char[] ch = str.toCharArray();
Posted by: Guest on April-07-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language