4 ms·
TRWTF is this: for (String s : args[0].split("\\s+")) System.out.println(s); which is exactly the same as: System.out.println(args[0]); (redacted)
by chrisbroadfoot 18y ago
TRWTF is this:
for (String s : args[0].split("\\s+"))
System.out.println(s);
which is exactly the same as:
System.out.println(args[0]);
(redacted)
- jdale27 18y ago[jdale@localhost ~]$ java -cp . Test "foo bar baz" foo bar baz
- chrisbroadfoot 18y agoOh, good point. Cheers. I then submit my Groovy solution: args[0].split().each { println it }