Main difference between C++ and Java:
Both C++ and Java both are object oriented programming language but yet there is difference between the 2 programming language :
1. Pointers :
C++ supports pointers which are variables which explicitly stored memory address.
As every variable is a memory location and every memory location has its address defined which can be accessed using ampersand (&) operator which denotes an address in memory.
Difference between Java and C++
Both C++ and Java both are object oriented programming language but yet there is difference between the 2 programming language :
1. Pointers :
C++ supports pointers which are variables which explicitly stored memory address.
As every variable is a memory location and every memory location has its address defined which can be accessed using ampersand (&) operator which denotes an address in memory.
Code:
eg. int main () { int addr = 30; //...