This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Here is a strange problem page 50 of �SCJP� by Kathy Sierra & Bert Bates Table of �range of numeric primitives�
For float & double the �minimum range� and �maximum range� has got �n/a�
while in another book the range has 1.4E-45 to 3.4E+38 for float and 4.9E-324 to 1.7E+308 for double
By the way I know this might said strange I have added on to the table Boolean �true� of �false� [ October 05, 2007: Message edited by: Eric Richards ]
Floating-point primitives (float and double) use IEEE 754 standards, and their range comes at the expense of precision. These details are beyond the scope of the SCJP exam, so "n/a" is probably appropriate for a study guide.
(Also, note that float and double types can represent negative or positive infinity.)
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer sscce.org
Originally posted by Eric Richards: ...By the way I know this might said strange I have added on to the table Boolean �true� of �false�
Keep in mind that Java boolean types are not "numeric." Unlike some languages, you cannot treat these as zeros and ones. Also, the size of a Java boolean is not specified.
Eric Richards
Greenhorn
Joined: Apr 30, 2007
Posts: 5
posted
0
yes it is just that each time I look at the table, it reminds me, to use true or false for boolean and not 1 or 0.
Originally posted by marc weber:
Keep in mind that Java boolean types are not "numeric." Unlike some languages, you cannot treat these as zeros and ones. Also, the size of a Java boolean is not specified.
Eric Richards
Greenhorn
Joined: Apr 30, 2007
Posts: 5
posted
0
What a pity some comment like this was not added to the book, I thought it was strange it should be n/a so I had to waste time looking somewhere else.
Originally posted by marc weber: Welcome to JavaRanch!
Floating-point primitives (float and double) use IEEE 754 standards, and their range comes at the expense of precision. These details are beyond the scope of the SCJP exam, so "n/a" is probably appropriate for a study guide.
(Also, note that float and double types can represent negative or positive infinity.)