C++ vs Java

Edit this comparison chart

C++

User Rating (238):

Java

User Rating (22):
Appeared in 1985 1995
Designed by Bjarne Stroustrup James Gosling, Sun Microsystems and Oracle Corporation
Major Implementations GNU Compiler Collection, Microsoft Visual C++, Borland C++ Builder, Intel C++ Compiler, LLVM/Clang Sun/Oracle, OpenJDK
Paradigms Multi-paradigm, object-oriented programming, generic programming, procedural programming, functional programming, metaprogramming Multi-paradigm, object-oriented programming, generic programming, reflective
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
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 */
Statement terminators ; ;
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. basically slower than C++
Platform Any that has a compiler Any that supports JVM

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

Related Articles


share