how to convert string to character array using java