Java rompa la cuerda en palabras
String s = "I want to walk my dog";
String[] arr = s.split(" ");
for ( String ss : arr) {
System.out.println(ss);
}
Karamolegkos
String s = "I want to walk my dog";
String[] arr = s.split(" ");
for ( String ss : arr) {
System.out.println(ss);
}
{
public static void main(String args[])
{
String str = "Hey this is Ram";
String [] words = str. split(" ", 3);
for (String word : words)
System. out. println(word);