Difference between java and C++
by, 01-08-2012 at 10:44 AM (1559 Views)
Java and C++ are almost similar in syntax. Following are the major differences between these:
- Java has no support to C++ pointers.
- Java has no support for multiple inheritances. Java has replaced multiple inheritances with multiple interface inheritance. Interface inheritance allows methods to be inherited from different interfaces. It is also referred to as polymorphism.
- Java has replaced destructors with finalize methods. These methods are called by the garbage collector and memory is collected by this garbage collector.
- Java has no support for structures. Java is object oriented framework and structures are not supported.