Summary

Section 29.2 Streams

  • Input and output are usually performed with streams, which are sequences of bytes. In input operations, the bytes flow from a device to main memory. In output operations, bytes flow from main memory to a device.

  • Normally, the standard input stream is connected to the keyboard, and the standard output stream is connected to the computer screen.

Section 29.3 Formatting Output with printf

  • The printf format string describes the formats in which the output values appear. The format specifier consists of argument index, flags, field widths, precisions and conversion characters.

Section 29.4 Printing Integers

  • Integers are printed with the conversion characters d for decimal integers, o for integers in octal form and ...

Get Java™ How to Program, Seventh Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.