Types in Java
Almost all data items and operations on them are done through objects and
methods. Java offers non object-oriented types and operations for simple
things like numbers:
- byte: 8 bit two's compliment integer.
- short: 16 bit two's compliment integer.
- int: 32 bit two's compliment integer.
- long: 64 bit two's compliment integer.
- float: 32 bit floating point using IEEE 754-1985 standard.
- double: 64 bit floating point using IEEE 754-1985 standard.
- char: 16 bit Unicode character.
- boolean: two valued type, with values true and false.
Java has no unsigned numeric types, unlike C++.
Boolean values are not integers, like in C and C++.
Unicode coincides with ASCII. Most character and string operations
can ignore the fact that chars are 16 bit entities.