ok i am doing a programe that can read a string eg, "Lordofthering" is there any way to break up the String into char?? i try StringTokenizer but fail. :cry: :cry:

i need the result to be printed to text file:
L
o
r
d
o
f
t
h
e
r
i
n
g

meaning that the string " lordofthering" is break up to a char"L" :eek:

Why not try something like this:

for(int x = 0; x < word.length() - 1; x++)
{
String letter = word.charAt(x); //you could make letter a char is you want
//write letter to the file
}

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.