lionheart wrote:
i mean a character array so that you can put the letters of the string in it..
i am aware of..
split() but doesn't that nly work for seperate words
no it dosen't.. it can work on individual characters.. just supply it the "correct" regex for the delimiter.. in the case of separating individual characters.. there is no delimiter so supply an empty String..
code: |
String[] split = "John Doe".split("");
for (String s : split)
System.out.println(s); |