|
Primitive types (also known as the fundamental types) common to both C++ and Java are:
A boolean type: bool in C++ and boolean in Java.
Character types: char in both C++ and Java. Additionally, signed char and unsigned char in C++.
Integer types: short, int, long in both C++ and Java. Additionally, byte in Java. Additionally, signed int and unsigned int in C++. The type signed int in C++ is synonymous with int.
Floating-point types: float and double in both C++ and Java. Additionally, long double in C++.
|