146
Does this exist anywhere outside of C++?
(lemmy.ml)
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Kinda in Java, you can call System.out.println or you can call System.out.print and explicitly write the newline.
I haven't looked at the code but I always assumed that
printlnwas a call toprintwith a new line added to the original input.Something like this:
That is pretty much what it does except it doesn't hardcode
\nbut instead uses the proper line ending for the platform it's running on.I haven't worked with java for a couple of months now, currently working in Delphi, so could not remember the how else to do new line except backslash n on top of my head. :-)