Cplus plus vs Java vs Python?


Here we will see some basic differences between C++, Java and the Python. At first we will see the C++ and Java differences, then the Java and Python differences.

TopicC++Java
Memory ManagementIt uses pointers, structures, unions and references
It does not support pointers. It supports references. It also supports Threads, interfaces
LibrariesLow level functional libraries
Wide range of library, with various functionalities
Multiple InheritanceSupports multiple inheritance using normal classes
Supports multiple inheritance with only interfaces (pure abstract classes)
Operating OverloadingOperator overloading is supported
Does not support operator overloading
Program HandlingFunctions and variables can reside outside of the classes
Functions, variables can only be there inside classes or packages
PortabilityCode is dependent on platform. It needs recompile
Platform independent. compiled version can run any platform which has the JVM installed
Thread SupportNo built-in threads
Built-in threads are present

Now let us see the differences between Java and Python.

TopicJavaPython
Compilation processCode is compiled using compilers
Code is interpreted using Python interpreter
Code LengthHigher number of code lines as compared to Python
Less number of code lines as compared to Java
SyntaxEach block will be separated using braces, and each line will be terminated using semicolon
Each block is separated using indentation. The line ending does not need semicolon
Ease of typingThis is strongly typed. Each variable needs datatypes that are defined earlier
Dynamic in nature. We do not need to specify the datatypes.
Speed of executionJava is faster than python
Python is slower than Java
Multiple inheritanceSupports multiple inheritance with only interfaces (pure abstract classes)
Supports multiple inheritance

Updated on: 20-Aug-2019

263 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements