Caterpillar interview question

Difference between C++ and Java.