how to put each character in a string into an array code example Example: convert string to char array in java String str = "example"; char[] ch = str.toCharArray();