java string to char array
String str = "example";
char[] ch = str.toCharArray();
java string to char array
String str = "example";
char[] ch = str.toCharArray();
char array to string java
char[] a = {'h', 'e', 'l', 'l', 'o', ' ', 'w', 'o', 'r', 'l', 'd'};
String str = new String(a);
Convert char array to string in java
// java convert array of char to string
public class CharArrayToString
{
public static void main(String[] args)
{
char[] charArray = new char[]{'F','l','o','w','e','r','B','r','a','c','k','e','t','s'};
String str = new String(charArray);
System.out.println(str);
}
}
java char array to string
final char[] charArray = { 'g','e','e','k','s','f','o','r','g','e','e','k','s' };
String string = new String(charArray);
System.out.println(string);
// -> "geeksforgeeks"
change string to char array
String myString = "Hello, world!";
char[] myCharArray = myString.toCharArray();
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