Java spliting strings

Posted by N0b on Stack Overflow See other posts from Stack Overflow or by N0b
Published on 2010-05-16T23:03:33Z Indexed on 2010/05/16 23:10 UTC
Read the original article Hit count: 112

Filed under:
|

Hi

I've got a Java problem.

I'm trying split a string when ever a " " occurs, for example the sentence test abc. Then move the first letter in each word from first to last. I got the moving the letter to work on the original string using

String text = JOptionPane.showInputDialog(null,"Skriv in en normal text:");
char firstLetter = text.charAt(0);
normal = text.substring(1,text.length()+0) + firstLetter;

So my question is how would I split the string then start moving the letters around in each part of the cut string?

Thanks in advance

© Stack Overflow or respective owner

Related posts about java

Related posts about split