Numeric Types
Python |
Java |
int represents integers ranging from -2^{31}
through 2^{31}-1. long represents very large integers to the extent
supported by the machineÕs memory. float represents floating-point numbers with 16 digits
of precision. |
int represents integers ranging from -2^{31}
through 2^{31}-1 (4 bytes). long represents larger integers ranging from -2^{63}
through 2^{63}-1 (8 bytes). short represents smaller integers ranging from -2^{15}
through 2^{15}-1 (2 bytes).
float represents smaller floating-point numbers with 7
digits of precision (4 bytes). double represents larger floating-point numbers with 16
digits of precision (8 bytes). |