

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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 Questions & Answers
- Difference between Go and Java.
- Difference between Java and JavaScript.
- Difference between Java and C language
- Difference between Java SE, Java EE, and Java ME?
- Difference between ArrayList and CopyOnWriteArrayList in Java
- Difference between HashMap and ConcurrentHashMap in Java
- Difference between HashTable and HashMap in Java
- Difference between ODBC and JDBC in Java
- Difference between super() and this() in Java
- Difference between Object and Class in Java
- Difference between HashMap and HashTable in Java.
- Difference between StringBuilder and StringBuffer in Java
- Difference between string and StringBuffer in Java.
- Difference between == and equals() method in Java.
- Difference between charAt() and indexOf() in Java ?
Advertisements