O'Reilly logo

Groovy Programming by John Savage, Kenneth Barclay

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required