what is the difference between 'Float a = 3f' and 'Float a = 3.0' in java?
double, floating-point, java, literals
Solution
The number `3.0` is the literal representation of a `double` value (it's equivalent to `3.0d`), whereas `3.0f` is a `float` value. The different precisions explain why you're getting different results - a `double` is stored using 64-bits, a `float` uses 32-bits.
Problem
If I perform ``` 97346822*3f, result is 2.9204048E8, ``` however ``` 97346822*3.0 gives me 2.92040466E8. ``` Please explain.