B4A - Ch1 - Section 1 - Data Types

Getting started with any language we need to reference what our variable types are.  All of the types in B4A are the standard Java types

Data Types

Standard Data Types
Name Size Range
Byte 1 byte signed -128 to 127
Char 2 bytes unsigned 0 to 65535
Short 2 bytes signed -32768 to 32767
Int 4 bytes signed -2,147,483,648 to 2,147,483,647
Long 8 bytes signed -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
Float 4 bytes +/- 3.4e +/- 38 (~7 digits)
Double 8 bytes +/- 1.7e +/- 308 (~15 digits)

Note: Unlike VB, B4A doesn't support Currency or Decimal data types. Use their equivilants (Float or Double)