此代码不会从下部输出控制台产生任何文本输出。我缺少配置设置还是代码错误?
该代码似乎有效,因为控制台将在0秒内显示构建成功。
public class SpaceRemover {
public static void main(String[] args) {
String mostFamous = "Rudolph the Red-Nosed Reindeer";
char[] mfl = mostFamous.toCharArray();
for (int dex = 0; dex < mfl.length; dex++) {
char current = mfl[dex];
if (current != ' ') {
System.out.print(current);
} else {
System.out.print('.');
}
}
System.out.println();
}
}
构建成功,但未打印任何文本。