Difference between print and println in Java

print will not wrap after this output, and println will wrap after this output.

You can see that println is equivalent to the effect of print plus a newline.

As shown in the figure below, you can see the difference between the two used in the 99 multiplication table:



Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324746427&siteId=291194637