February 2014
Beginner
1248 pages
62h 25m
English
• A floating-point number (p. 84) is a number with a decimal point. Java provides two primitive types for storing floating-point numbers in memory—float and double (p. 84).
• Variables of type float represent single-precision floating-point numbers and have seven significant digits. Variables of type double represent double-precision floating-point numbers. These require twice as much memory as float variables and provide 15 significant digits—approximately double the precision of float variables.
• Floating-point literals (p. 84) are of type double by default.
• Scanner method nextDouble (p. 88) returns a double value.
• The format specifier %f (p. 88) is used ...
Read now
Unlock full access