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"
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"
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);
String to Char array
String s="abcd";
char[] a=s.toCharArray();
for(char c:a)
{ System.out.println(c); }
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us