
- C++ Basics
- C++ Home
- C++ Overview
- C++ Environment Setup
- C++ Basic Syntax
- C++ Comments
- C++ Data Types
- C++ Variable Types
- C++ Variable Scope
- C++ Constants/Literals
- C++ Modifier Types
- C++ Storage Classes
- C++ Operators
- C++ Loop Types
- C++ Decision Making
- C++ Functions
- C++ Numbers
- C++ Arrays
- C++ Strings
- C++ Pointers
- C++ References
- C++ Date & Time
- C++ Basic Input/Output
- C++ Data Structures
- C++ Object Oriented
- C++ Classes & Objects
- C++ Inheritance
- C++ Overloading
- C++ Polymorphism
- C++ Abstraction
- C++ Encapsulation
- C++ Interfaces
Difference Between C++ and Java
Java | C++ |
---|---|
Java was developed by James Gosling at Sun Microsystems. | C++ was developed by Bjarne Stroustrup at Bell Labs, as an extension to C language. |
It was influenced by Ada 83, Pascal, C++, C#. | It was influenced by Ada, ALGOL 68, C, ML, Simula, Smalltalk. |
The Java bytecode works on any operating System. | It doesn’t work on every operating system since libraries are different on different systems. |
It can run on any OS. | It is compiled differently on different platforms, can’t be run on any OS. |
It is portable. | It isn’t portable. |
It is an interpreted language. | It is a compiled language. |
Memory management is done automatically. | Memory management is done manually. |
It doesn’t have ‘virtual’ keyword. | It has the ‘virtual’ keyword. |
It supports single inheritance only. Multiple inheritance can be achieved using interfaces (partial only). | It supports single and multiple Inheritance. |
It doesn’t support operator overloading. | It supports operator overloading. |
It provides limited support to pointers. | It supports pointer operations. |
They have high level functionalities. | They have low level functionalities. |
It doesn’t support direct native library call. | It supports direct system library calls. |
It supports documentation comment (/**.. */) for source code. | It doesn’t support documentation comment for source code. |
It supports thread operations. | It doesn’t support threads by design. It can be done by using third party threading libraries. |
It uses the ‘System’ class, i.e System.in for input. | It uses ‘cin’ for input operation. |
It uses System.out for output. | It uses ‘cout’ for an output operation. |
It uses System.out for output. | It uses ‘cout’ for an output operation. |
It doesn’t support global scope. | It supports global scope as well as namespace scope. |
It doesn’t support structures and unions. | It supports structures and unions. |
It doesn’t have the ‘goto’ keyword | It supports the ‘goto’ keyword. |
It supports Pass by Value method only. | It supports Pass by Value and pass by reference methods. |
It performs object management automatically using garbage collector. | It performs object management manually with the help of ‘new’ and ‘delete’. |
- Related Articles
- Difference between Java and JavaScript.
- Difference between Go and Java.
- Difference between Groovy and Java
- Difference between Java and C language
- Difference between Java SE, Java EE, and Java ME?
- What is the difference between Java and Core Java?
- What is the difference between Java and Java EE
- Difference between ArrayList.clear() and ArrayList.removeAll() in java?
- Difference between Applets and Servlets in Java.
- Difference between ArrayList and HashSet in Java
- Difference between Arrays and Collection in Java
- Difference between concat() and + operator in Java
- Difference between Definition and Declaration in Java.
- Difference between HashMap and HashSet in Java.
- Difference Between LinkedList and LinkedHashSet in Java

Advertisements