Skip to content

Latest commit

 

History

History
27 lines (21 loc) · 1.77 KB

2023-11-30-c++-vs-java.md

File metadata and controls

27 lines (21 loc) · 1.77 KB
layout title author categories featured toc description
post
Difference Between C++ and Java
gaurav
Java
Core Java
false
true
In this article, we will see the difference between C++ and Java.

In today's programming world, both C++ and Java are popular.

Both are the Object object-oriented programming languages. Still, C++ and Java have a different set of features for different use cases.

Let's try to understand the basic difference between C++ and Java.

Difference between C++ and Java (C++ vs Java)

{:class=" table table-bordered"}

Property C++ Java
Platform Independence C++ is a platform-dependent programming language. C++ is a platform-independent programming language.
Garbage Collection Programmer has to take care of the Garbage Collection. I.e. Removing unrefereed objects from the memory. Java has a provision to remove unreferred objects from the memory. i.e. Garbage Collection
Multiple Inheritance C++ supports multiple inheritance. Java does not support multiple inheritance.
Internal access to Memory C++ has the concept of 'Pointers' to access the internal memory. Java does not have Pointers.
Object Oriented C++ is less object-oriented as we can write structural programs without using objects. Java is more purer Object Oriented Language as compared to C++ (except for primitive variables).