Glossary: Coding Interviews in Java
printf
Also written: %d, %n, %.2f, format specifier
A Java method that formats text using codes like `%,d` (thousands commas), `%.2f` (two decimals), `%-12s` (left-aligned) and `%n` (new line).
Glossary: Coding Interviews in Java
Also written: %d, %n, %.2f, format specifier
A Java method that formats text using codes like `%,d` (thousands commas), `%.2f` (two decimals), `%-12s` (left-aligned) and `%n` (new line).