difference between java and c++

can anyone point out major difference between java and c++
I've once read that " Java is, in many ways, C++-- "
The first difference is the syntax. Other than that, the major differences are:
C++
* OOP is optional.
* Compiled: produces non-portable native code.
* Manually managed memory. Garbage collection libraries are available.
* Source can be written to be portable, so a correctly written program can be compiled for any platform where a C++ compiler is available.
* Mostly used for medium-to-high performance applications, such as games.

Java
* Almost a purely OO language. It's not purely OO because primitive types (e.g. int, float) can still be used.
* Semi-compiled: produces bytecode to be interpreted at run time by a virtual machine or a just-in-time compiler, depending on implementation.
* Memory is always managed by a garbage collector.
* Portability depends on availability of a Java implementation, but programs are usually compiled just once.
* Mostly used for web and embedded applications, where binary compatibility is more important than performance.
Last edited on
Topic archived. No new replies allowed.