1. | Founder | Java was developed by James Gosling at Sun Microsystems. | C++ was developed by Bjarne Stroustrup at Bell Labs in 1979 as an extension of the C language. |
2. | First Release | On May 23, 1995 | In October 1985 |
3. | Stable Release | Java SE 18 was released on 22 March 2022 | C++20 released on 15th December 2020 |
4. | Official Website | oracle.com/java | isocpp.org |
5. | Influenced By: | Java was Influenced by Ada 83, Pascal, C++, C#, etc. languages. | C++ was Influenced by Influenced by Ada, ALGOL 68, C, ML, Simula, Smalltalk, etc. languages. |
6. | Influenced to: | Java was influenced to develop BeanShell, C#, Clojure, Groovy, Hack, J#, Kotlin, PHP, Python, Scala, etc. languages. | C++ was influenced to develop C99, Java, JS++, Lua, Perl, PHP, Python, Rust, Seed7, etc. languages. |
7. | Platform Dependency | Platform-independent, Java bytecode works on any operating system. | Platform dependent, should be compiled for different platforms. |
8. | Portability | It can run on any OS hence it is portable. | C++ is platform-dependent. Hence it is not portable. |
9. | Compilation | Java is both Compiled and Interpreted Language. | C++ is a Compiled Language. |
10. | Memory Management | Memory Management is System Controlled. | Memory Management in C++ is Manual. |
11. | Virtual Keyword | It doesn’t have a Virtual Keyword. | It has Virtual keywords. |
12. | Multiple Inheritance | It supports only single inheritance. Multiple inheritances are achieved partially using interfaces. | It supports both single and multiple Inheritance. |
13. | Overloading | It supports only method overloading and doesn’t allow operator overloading. | It supports both method and operator overloading. |
14. | Pointers | It has limited support for pointers. | It strongly supports pointers. |
15. | Libraries | It doesn’t support direct native library calls but only Java Native Interfaces. | It supports direct system library calls, making it suitable for system-level programming. |
16. | Libraries | Libraries have a wide range of classes for various high-level services. | C++ libraries have comparatively low-level functionalities. |
17. | Documentation Comment | It supports documentation comments (e.g., /**.. */) for source code. | It doesn’t support documentation comments for source code. |
18. | Thread Support | Java provides built-in support for multithreading. | C++ doesn’t have built-in support for threads, depends on third-party threading libraries. |
19. | Type | Java is only an object-oriented programming language. | C++ is both a procedural and an object-oriented programming language. |
20. | Input-Output mechanism | Java uses the (System class): System.in for input and System.out for output. | C++ uses cin for input and cout for an output operation. |
21. | goto Keyword | Java doesn’t support goto Keyword | C++ supports goto keyword. |
22. | Structures and Unions | Java doesn’t support Structures and Unions. | C++ supports Structures and Unions. |
23. | Parameter Passing | Java supports only the Pass by Value technique. | C++ supports both Pass by Value and pass by reference. |
24. | Inheritance Tree | All classes in Java are subclasses of the Object class, hence Java only ever follows a single inheritance tree. | A fresh inheritance tree is always created in C++. |
25. | Global Scope | It supports no global scope. | It supports both global scope and namespace scope. |
26. | Object Management | Automatic object management with garbage collection. | It supports manual object management using new and delete. |
27. | Call by Value and Call by reference | Java supports only call by value. | C++ both supports call by value and call by reference. |
28. | Hardware | Java is not so interactive with hardware. | C++ is nearer to hardware. |
29. | Language Used for | Internet and Android games, Mobile applications, Healthcare and research computation, Cloud applications, Internet of Things (IoT) devices, etc. | Game engines, Machine learning, Operating systems, Google Search Engine, Web browsers, Virtual Reality (VR), Game development, Medical technology, Telecommunications, Databases, etc. |
30. | Application built | Wikipedia, LinkedIn, Android OS, Uber, and Minecraft, | Mozilla Firefox, Amazon, Apple OS, Spotify, Adobe Photoshop, and Youtube. |