Anonymous

What Are The Similarities Between C++ And Java?

2

2 Answers

David Cornish Profile
David Cornish answered

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.

Anonymous Profile
Anonymous answered
Both are object oreinted meaning that the user can make classes to reuse over and over again. The main difference is the platform. In order to run java you need the java virtual machine installed on your computer whereas C++ is compiled directly to an executeable format.

Answer Question

Anonymous