I am beginner in Java and I am just reading one of the pdfs for beginners like me. So in my book I found this:

So for example the floating point numbers may be within the range of
1.4E-45 to 3.4028235E+38
So according to my math, that number can be very small (near the zero) or quite large, but it CAN NOT be a negative number.
Am I correct?
The book states the MIN_VALUE and MAX_VALUE for the floating point types. This range describes available precision but it is certainly not the case that all values must fall between MIN_VALUE and MAX_VALUE as you can easily confirm by assigning zero or a negative number to a float variable.
Floating point values (float and double) can be one of the following:
NaN (not a number)-MAX_VALUE and -MIN_VALUEMIN_VALUE and MAX_VALUEFloat range is approximately ±3.40282347E+38F (6-7 significant decimal digits) Java implements IEEE 754 standard.
Refer below links
https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html
http://cs-fundamentals.com/java-programming/java-primitive-data-types.php
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With