1.

C++ vs Java

Answer»

C++ and Java are programming languages with many differences and similarities. C++ supports both procedural as well as object-oriented programming language while Java is purely an object oriented programming language.

The major differences between C++ and Java are GIVEN as follows:

C++
Java
The main usage of C++ is for system programming.
The main usage of Java is for application programming.
Structures and Unions are supported by C++.
Structures and Unions are not supported by Java.
There is no build-in support for threads in C++.
There is build-in support for threads in Java.
The goto statement is supported by C++.
The goto statement is not supported by Java.
The >>> operator is not supported by C++.
The >>> operator is supported by Java.
Operator overloading is supported by C++.
Operator overloading is not supported by Java.
Call by VALUE and call by reference are both supported by C++.
Only call by value is supported by C++.
C++ is platform dependent.
Java is platform independent.
Single root hierarchy is not possible in C++.
Single root hierarchy is possible in Java as everything is derived from java.lang.Object.
There is no support for DOCUMENTATION comments in C++.
There is support for documentation comments in Java to provide documentation for Java code.
Multiple inheritance is supported in C++.
Multiple inheritance is not supported in Java.
There is a virtual keyword in C++. It is used to override a function.
There is no virtual keyword in Java. Override of all non-static FUNCTIONS is possible by default.
C++ is quite interactive with hardware.
Java is not so interactive with hardware.


Discussion

No Comment Found