Skip to main content

Primitive Types

Information

Primitive types are objects that don't have a real class and don't inherit methods from Object.

All primitive types

byteByte8 bit decimal number.
shortShort16 bit decimal number.
intInteger32 bit decimal number, most common decimal type.
longLong64 bit decimal number.
floatFloat32 bit floating point number.
doubleDouble64 bit floating point number.
charCharacterSingle character in String such as 'a' or '-'.
booleanBooleanOnly true and false values. Can be checked in if function without comparing to true, as if (x) or if (!x) instead of if (x == true) or if (x == false).