Comparison of Java and C++

To C, C++ added support for object-oriented programming, exception handling, lifetime-based resource management (Resource Acquisition Is Initialization (RAII)), generic programming, template metaprogramming, and the C++ Standard Library which includes generic containers and algorithms (the Standard Template Library or STL), and many other general purpose facilities.

Java is a general-purpose, concurrent, class-based, object-oriented[1] programming language that is designed to minimize implementation dependencies.

In a nutshell, there are inherent inefficiencies and hard limits on optimizing in Java, given that it heavily relies on flexible high-level abstractions, however, the use of a powerful JIT compiler (as in modern JVM implementations) can mitigate some issues.

Some inefficiencies that are inherent to the Java language include, mainly: However, there are a number of benefits to Java's design, some realized, some only theorized: Also, some performance problems occur in C++: The C++ language is defined by ISO/IEC 14882, an ISO standard, which is published by the ISO/IEC JTC1/SC22/WG21 committee.

The committee is composed of the creator of C++ Bjarne Stroustrup, the convener Herb Sutter, and other prominent figures, including many representatives of industries and user-groups (i.e., the stake-holders).

Being an open committee, anyone is free to join, participate, and contribute proposals for upcoming releases of the standard and technical specifications.

The lack of a firm standard for Java and the somewhat more volatile nature of its specifications have been a constant source of criticism by stake-holders wanting more stability and conservatism in the addition of new language and library features.

In contrast, the C++ committee also receives constant criticism, for the opposite reason, i.e., being too strict and conservative, and taking too long to release new versions.