Integer Literals: Integer literals are whole numbers. They could be base 10 for decimal, base 8 for octal and base 16 for hexadecimal. Range of octal is from 0 to 7 and range of hexadecimal is from 0 to 9 and then A To F ( 10 to 15). To denote an octal value 0 is put at the beginning of the value and to denote a hexadecimal value 0x is put at the beginning of the value. A long literal is denoted by appending L to the value.
Floating point literals: Floating point literals are fractional numbers. They could be denoted by either standard notation or scientific notation. In Standard notation, whole number is point followed by fractional value. Example: 3.14. In scientific notation whole number is point followed by fractional value and suffix with a power of 10. Exponent is denoted by capital E or small e followed by a negative or positive decimal number. Example: 2.5E76, 86e-20.