Difference between Java and C++