java how to split an string into chars code example Example: split every character in string into array java String s="abcd"; char[] a=s.toCharArray();