Skip to content

Numeric types

Integer

An integer is declared with keyword int , which is 64-bit signed. The supported range is [-9223372036854775808, 9223372036854775807]. Integer constants support multiple formats:

  1. Decimal, for example 123456.
  2. Hexadecimal, for example 0xdeadbeaf.
  3. Octal, for example 01234567.

Double-precision floating-point

double-precision floating-point values is used for storing double precision floating point values. E.g., 1.2, -3.0000001. The keyword used for double floating point data type is double.

Scientific notation is also supported. For example, 1e2, 1.1e2, .3e4, 1.e4, -1234E-10.


Last update: March 16, 2021
Back to top