+ 5
Difference between java and c++?
2 Answers
0
I can think of 2 main differences:
About the language itself: Java does not heavily rely on pointers. C++ obviously does. That means Java manages memory on its own.
About the compilation: C++ is a compiled language, while Java code is compiled into bytecode which is then interpreted by the JVM (Java Virtual Machine).
Overall, Java is a bit higher level, as you don't need to directly take care of memory, the garbage collector does it for you. Also, the JVM allows it to be cross-platform. But C++ will be faster and less memory-hungry if your code is optimized.
0
I guess this link might help
https://www.javatpoint.com/cpp-vs-java