【发布时间】:2010-11-05 16:43:26
【问题描述】:
这是我正在使用的代码:
public class splitText {
public static void main(String[] args) {
String x = "I lost my Phone. I shouldn't drive home alone";
String[] result = x.split(".");
for (String i : result) {
System.out.println(i);
}
}
}
完美编译,但在运行时没有任何反应。我做错了什么?
【问题讨论】:
-
"编译完美,但运行时没有任何反应。" - 这可能会让你心碎,但仅仅因为它可以编译,并不意味着它可以工作。
-
Aww no.. 请告诉我你在开玩笑。 :P
-
计算机(几乎)总是完全按照您告诉他做的事情...不一定是您希望他做的事情...