java.io · java.base · since Java 1.1
PrintWriter
public class PrintWriter extends WriterConvenient formatted text output: print/println/printf. Swallows I/O errors by design (checkError() to ask) — fine for console, deliberate choice elsewhere.
Key methods
void println(Object x) | Value + platform line separator. |
PrintWriter printf(String format, Object... args) | Formatted output. |
boolean checkError() | The only way to learn of write failures. |