| Java | C++ |
|---|---|
| References, with no explicit pointer manipulation and no pointer arithmetic. |
Pointers, with dereferencing (* or ->) and address (&) operators. |
| Array references are not translated to pointer arithmetic. | Array references translate to pointer arithmetic. |
| Arrays automatically check index limits. | No automatically array bounds checking. |
| Array lengths in multidimensional arrays can vary from one element to the next within one dimension. |
Array lengths in multidimensional arrays are all the same size in a give dimension, fixed by the declaration. |
| Strings are objects. | Strings are null-terminated character arrays. |
| Built-in string concatenation operator(+). | String concatenation through a library function. |
| Use string concatenation operator for long string literals. | Use line continuation (\) for long string literals. |
No typedef. |
typedef to define types. |