Write down what are the main similarities between Java and C++

Similarities between Java and C++

1. Both C++ and Java are the Object-Oriented programming language. Unlike C, which is structural. Both uses the principle of OOPS but implementation and language design and architecture are completely different.

2. Code for Comments is similar in both C++ and Java, both the single-line // style as well as the potentially multiline /* … */ style.

3. Like C++, Java supports constructors that may be overloaded.

4. Both the languages allows you to overload functions. However, default arguments are not supported by Java.

5. Like C++, Java has primitive types such as int, float, etc. But unlike C++, the size of each primitive type is the same regardless of the platform.

About Author: Jeniffer Fleming