Back
Can anyone tell me what is the difference between printf & println in Java?
System.out.println(): To simply print a line of text.
System.out.printf(): When line of text needs to be formatted (ex: alignment left-justified, etc.)
Interested in Java? Check out this Java Certification by Intellipaat.
31k questions
32.8k answers
501 comments
693 users