difference between printf and println in java?

difference between printf and println in java?

System.out.println(); is efficient for simply printing a line of text. If the line of text needs to be formatted (ex: alignment (left-justified, etc.), etc.), then System.out.printf(); would be used.

Check out this link for more information.

difference between printf and println in java?

Leave a Reply

Your email address will not be published.