I know I have code that should work. I copied it straight from the book. I checked it myself and it is good.
Once I run the program in the IDE, the output should be on the lower output panel yet nothing comes out. The build was successful according to that panel but nothing is printed.
Is there some kind of configuration I need to modify for this to run? My IDE is set for Java 8 which I am using.
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(); } }