APPENDIX F MORE ON SIMPLE INPUT AND OUTPUT

In this appendix, we provide some further examples of formatted output and consider the input class Console, introduced in Chapter 5.

F.1 FORMATTED OUTPUT

A conversion specification in the format string is introduced with the percent (%) character. Then, there is a series of options to the conversion. The specification ends with the conversion operation expressed as a single character. The general definition for a conversion specification is then:

The optional index is an unsigned integer indicating the position of the parameter in the parameter list. The first argument is referenced by 1$, the second ...

Get Groovy Programming 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.