Datametica interview question

Difference between C++ and Java.