C++ vs Java (programming language)

Edit this comparison chart

C++

User Rating (238):

Java (programming language)

Appeared in 1985 1995
Designed by Bjarne Stroustrup James Gosling and Sun Microsystems
Major Implementations GNU Compiler Collection, Microsoft Visual C++, Borland C++ Builder, Intel C++ Compiler, LLVM/Clang OpenJDK, many others
Paradigms Multi-paradigm, object-oriented programming, generic programming, procedural programming, functional programming, metaprogramming Multi-paradigm: object-oriented, structured, imperative, generic, reflective, concurrent
Typing Discipline static, strong, unsafe, nominative Static, strong, safe, nominative, manifest
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
Influenced Ada 95, C#, Java, PHP, D, Aikido Ada 2005, BeanShell, C#, Clojure, D, ECMAScript, Groovy, J#, Javascript, PHP, Python, Scala, Seed7, Vala
Garbage Collection No Yes
Object-oriented Yes Yes
Generic Programming Yes Yes
Procedural Programming Yes Yes
Functional Programming Partial No
Statement terminators ; ;
Metaprogramming Yes No
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 */
Usual filename extensions .cc, .cpp, .cxx, .h, .hh, .hpp .java, .class, .jar, .war
Programming-include include import
Multidimensional arrays supported Yes Yes
Arrays dynamically sized No No
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++
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.

Related Articles


share