how can I print a single character from a string every time??
for example
in array[1] , a word "language" is stored
I would like to print a single reversed character every time
ie,
the output is
e
g
a
u
g
n
a
l
however, I print the wrong result
I know I should not use substring
But I don't know what method can fit my requirement
So, I hope people can help me
Thank you very much!
for ( int y = 0; y < tempStr[20].length() - 1; y++ ) System.out.println(tempStr[20].substring(tempStr[20].length()- y));

New Topic/Question
Reply




MultiQuote






|