What System.out.println() print out when it has no data?
Hi, so this seems like a very dumbr question...
What does System.out.println(); print out when no data is passed to it? Is it just regular whitespace? It's not a linebreak or space character?
I ask because I've got an exam in a few days, and I'm just going over a past paper. Some of the questions say, "If you think nothing is printed out, then write no output.", however, System.out.println(); is placed in such a way that even if, say an loop through an array didn't print anything [meaningful] out, there will always be a System.out.println(); outside of the array to print, but no data is passed to it - kinda to catch people out?
I tested this in Eclipse and within the command line area, there is whitespace printed out. Do you believe this would be considered something printed out?
Last edited by bingowinner; 05-19-2012 at 03:12 PM..