Question: what are the main differences between java and c++?
Answer: C++ is a compiled language. in C++ is compiled into an object code which can then be executed to produce an output. Java is a compiled as well as an interpreted language. The compiled output of a Java source code is a byte code which is platform-independent.