June 2017
Beginner
1296 pages
69h 23m
English
printfPrecise output formatting is accomplished with printf. Java borrowed (and enhanced) this feature from the C programming language. Method printf can perform the following formatting capabilities, each of which is discussed in this appendix:
Rounding floating-point values to an indicated number of decimal places.
Aligning a column of numbers with decimal points appearing one above the other.
Right justification and left justification of outputs.
Inserting literal characters at precise locations in a line of output.
Representing floating-point numbers in exponential format.
Representing integers in octal and hexadecimal format.
Displaying all types of data with fixed-size field widths and precisions.
Displaying ...
Read now
Unlock full access