6.2 PRIMITIVE TYPES IN C AND JAVA


6.2 PRIMITIVE TYPES IN C++ AND JAVA

Primitive types (also known as the fundamental types) common to both C++ and Java are:

  1. A boolean type: bool in C++ and boolean in Java.

  2. Character types: char in both C++ and Java. Additionally, signed char and unsigned char in C++.

  3. 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.

  4. Floating-point types: float and double in both C++ and Java. Additionally, long double in C++.




Programming With Objects[c] A Comparative Presentation of Object-Oriented Programming With C++ and Java
Programming with Objects: A Comparative Presentation of Object Oriented Programming with C++ and Java
ISBN: 0471268526
EAN: 2147483647
Year: 2005
Pages: 273
Authors: Avinash Kak

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net