Similarities between C++ and Java are listed below:
1. Comments: Comments are identical in C++ and Java, both the single-line // style as well as the potentially multi-line /* ... */.
2. Primitive Types: The Java and C++ primitive types are nearly identical.
3. Relational and Arithmetic Operators: Totally same
4. Control Constructs: The major Java and C++ control constructs are essentially identical.
5. Main: Execution of a C++ or Java program is the same in that the runtime system will look for an appropriate entry point named main and initiate execution of your program by causing control to start at the first statement of the identified.