[Solved] How do I make a string a string array?

[ad_1]

String text = "The Three Pigs";
String[] array = text.split(" ");

EDIT:

If you want to let the user to enter a line of text rather than a single word, then use:

String O = S.nextLine();

instead of:

String O = S.next();

3

[ad_2]

solved How do I make a string a string array?