.println()
automatically appends a newline, .print()
does not.
System.out
is a buffered stream; you need to .flush()
for the result of .print()
to appear (do it after you print, obviously). The newline in .println()
causes the output to be flushed, which is why you don't need it there.