+ 2

So, I just started to learn Java, and, I've found like "double" variable.

Does the "double" variable have the same meaning with "Float" in python? Because I saw that "double" is likee this : double score : 16.7; And Float : Age : 16.7 Do they the same? I mean, double is like a float number in python, or not?

15th Sep 2020, 3:09 PM
Givantaro Coding
Givantaro Coding - avatar
2 Antworten
+ 7
In Java, floats are represented in 32 bits, whereas double is represented via 64 bits (hence double, as in, double precision). In Python, float is already 64 bit, equivalent to a double in Java, C, etc. In general, they store the same type of information, so your understanding is correct. It's just that the size of the container is different.
15th Sep 2020, 3:14 PM
Hatsy Rei
Hatsy Rei - avatar
+ 1
Hatsy Rei thanks man! 👍 it really helpful
15th Sep 2020, 6:42 PM
Givantaro Coding
Givantaro Coding - avatar