Difference Between C++ and JAVA
C++
|
Java
|
C++ was developed by Bjarne Stroustrup. Development began in 1979.
|
Java was developed by James Gosling and his team. Development began in 1991.
|
C++ is a compiled language.
|
Java is both compiled and interpreted.
|
C++ programs are platform dependent. They need to be compiled for a particular platform.
|
Java programs are platform independent.
|
C++ does support operator overloading. Function overloading is also available.
|
Java does not support operator overloading. However, function overloading is possible.
|
C++ fully support pointers.
|
Java has restricted support for pointers. Pointers are supported internally you can not writer pointer programs.
|
C++ supports structures and union.
|
Java does not support structures and union.
|
C++ supports manual object management through new and delete keywords.
|
Java relies on automatic garbage collection. It does not support destructors the way C++ does.
|
C++ supports goto statement (however the use of goto is discouraged as not considered a good practice)
|
Java does not support goto statement (although goto is a reserved keyword in Java)
|
C++ supports multiple inheritance.
|
Java does not really support multiple inheritance. But similar results can be achieved through the use of interfaces.
|
C++ provides support both for call by value and call by reference.
|
Java supports only call by value.
|
C++ has no support for the unsigned right shift operator ( >>> ).
|
Java supports the unsigned right shift >>> operator.
|
Comments
Post a Comment