Numeric Types
Python |
Java |
int represents integers ranging from -231
through 231-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 -231
through 231-1 (4 bytes). long represents larger integers ranging from -263
through 263-1 (8 bytes). short represents smaller integers ranging from -215
through 215-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). |