C++ vs. Java (programming language)

Related Comparisons



Edit this comparison chart

C++

User Rating (272):

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 programming, generic programming, procedural programming, functional programming, metaprogramming 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 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 compare with C if you know how to make a good use of C++.The performance of C++ and C are equal, since compilers 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
Runs on native OS Virtual machine
Inline comments delimiter // //
Block comments delimiter /* and */ /* and */
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.

Follow Diffen
Make Diffen Smarter.

Log in to edit comparisons or create new comparisons in your area of expertise!

Sign up »
Top 5 Comparisons

share