February 2014
Beginner
1248 pages
62h 25m
English
• System.out.printf method (p. 43; f means “formatted”) displays formatted data.
• Method printf’s first argument is a format string (p. 44) containing fixed text and/or format specifiers. Each format specifier (p. 44) indicates the type of data to output and is a placeholder for a corresponding argument that appears after the format string.
• Format specifiers begin with a percent sign (%) and are followed by a character that represents the data type. The format specifier %s (p. 44) is a placeholder for a string.
• The %n format specifier (p. 44) is a portable line separator. You cannot use %n in the argument to System.out.print or System.out.println; however, the line separator output by System.out.println ...
Read now
Unlock full access