I saw this sentence in some matrices:
"In Java, simple data types, such as int and char, work the same as in C."
I am wondering what they actually differ in Java and C ++?
In C ++, simple variables, such as primitives in Java, are assigned a memory address, so these primitive types in C ++ can have a pointer. However, Java primitives are not assigned a memory address, such as "Objects".
Am I right?
Thanks!
source
share