Introduction
An important part of the solution to any problem is the presentation of the results. In this chapter, we discuss the formatting features of method printf and class Formatter (package java.util). Method printf formats and outputs data to the standard output streamSystem.out. Class Formatter formats and outputs data to a specified destination, such as a string or a file output stream.
Many features of printf were discussed earlier in the text. This chapter summarizes those features and introduces others, such as displaying date and time data in various formats, reordering output based on the index of the argument and displaying numbers and strings with various flags.