java - How Or why is there a limit on any primitive data types -
in java like, short range -32768 32767, while int, -2147483648 2147483647. looks designers created different sized buckets store range values.then have created bunch of more data types of different ranges, boiled down 8 types these ranges. reasons?
instead of exposing data structure (or 2 1 number other chars) can store user defined dataset have worked.
byte
1 byte, short
2 bytes, int
4 bytes, , long
8 bytes. other data types storing other types of data. numbers mentioned largest , smallest signed integers can fit within one, two, four, , 8 bytes respectively. (and 1, 2, 4, , 8 powers of two.)
Comments
Post a Comment