3 ms·
Sorry but I stopped reading here... System.exit(0); It's hardly going to be fair and balanced with things like that in it.
by axod 18y ago
Sorry but I stopped reading here...
System.exit(0);
It's hardly going to be fair and balanced with things like that in it.
- chrisbroadfoot 18y agoTRWTF 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 }
- paul 18y agoHis StringBuffer example is also wrong (the java compiler would automatically use a StringBuffer in his example).
- chrisbroadfoot 18y agoStringBuilder?
- paul 18y agoOh yeah, that's right, since jdk1.5. It used to be StringBuffer.