Related Comparisons



C++

Java (programming language)

Designed by
Bjarne Stroustrup James Gosling and Sun Microsystems
Typing Discipline
Static, Strong, Unsafe, Nominative Static, strong, safe, nominative, manifest
Influenced
Ada 95, C#, Java, PHP, D, Aikido Ada 2005, BeanShell, C#, Clojure, D, ECMAScript, Groovy, J#, Javascript, PHP, Python, Scala, Seed7, Vala
Paradigms
Multi-paradigm, Object-Oriented, Generic, Procedural, Functional, Meta Multi-paradigm: object-oriented, structured, imperative, generic, reflective, concurrent
Appeared in
1985 1995
Major Implementations
GNU Compiler Collection, Microsoft Visual C++, Borland C++ Builder, Intel C++ Compiler, LLVM/Clang OpenJDK, many others
Influenced by
C, Simula, Ada 83, ALGOL 68, CLU, ML Ada 83, C++, C#, Eiffel, Generic Java, Mesa, Modula-3, Oberon, Objective-C, UCSD Pascal, Smalltalk
Garbage Collection
No GC available on the C++ standard library (STD). However, STD provides efficient and deterministic ways to manage resource such as object ownership and reference counting. Yes
Object-oriented
Yes Yes
Usual filename extensions
.cc, .cpp, .cxx, .h, .hh, .hpp .java, .class, .jar, .war
Generic Programming
Yes Yes
Programming-include
#include import
Speed
+-5% when compared with C if you know how to make a good use of C++. The performance of C++ and C programs can often be equal, since compilers for both languages are mature. slower than C++
Procedural Programming
Yes Yes
Functional Programming
Partial No
Metaprogramming
Yes No
Statement terminators
; ;
Reflection
No Yes
code
Compiled to native binary executable files compiled to bytecode
Inline comments delimiter
// //
Block comments delimiter
/* and */ /* and */
Developed by
Bjarne Stroustrup Oracle Corporation
Multidimensional arrays supported
Yes Yes
Arrays dynamically sized
No No
Platform
Any that has a compiler Mac, Windows, Linux, Android; any platform that supports JVM

Add content for C++ vs. Java (programming language) or review and improve the comparison table above.