Skip to content

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).

Where the book teaches it