Java printf Method – Displaying data using System.out.printf – Java Programming Tutorial – Appficial

Java

Video is ready, Click Here to View ×


In addition to println and print, there is also a printf method, which allows you to do formatted console output

System.out.printf(FormatString, ArgList);

FormatString is a string that contains text also may contain special formatting specifiers such as %s, %f, or %d

%d – integers (integer decimals)
%f – floating-point numbers
%s – Strings
ArgList (optional) is a coma separated list of arguments that will be formatted according to the format specifiers

Please SUBSCRIBE, and check…

4 thoughts on “Java printf Method – Displaying data using System.out.printf – Java Programming Tutorial – Appficial

Leave a Reply

Your email address will not be published. Required fields are marked *