Numbers
Numbers are a primitive data type in BBAP. They are used to represent numeric values.
There are two basic types of numbers in BBAP: integers and floating-point numbers.
The specific types determine the size and precision of the number.
Number Types
Type/Keyword | Range | Size |
---|---|---|
int | -2,147,483,648 to 2,147,483,647 | 32-bit |
long | -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 | 64-bit |
float | ±1.5 x 10−45 to ±3.4 x 1038 | 32-bit |
double | ±5.0×10−324 to ±1.7×10308 | 64-bit |
If you want to know more about how you can use numbers in BBAP, you can look at number literals.