In both languages, commenting is identical. Two forward slashes, “//”, indicate a single-line comment, while “/*…*/” indicates a multi-line comment (“cplusplus.com” n.d.). Primitive data types, such as int, float, and char, are nearly indistinguishable, and arithmetic operators, such as addition (+), subtraction (-), multiplication (*), and division (/), are carried out in the same manner. Control constructs, such as if statements, for loops, while loops, and switch statements, are also shared among both languages(“cplusplus.com” n.d.). Both languages support classes, and single inheritance in C++ is comparable to Java (“Cornell.edu” n.d.). Both Java and C++ also allow for function …show more content…
C++ was developed several years before Java, which allowed for Java to be heavily influenced by it (“Saylor.org” n.d.). Though Java was influenced by C++, it has many notable features that distinguishes it from C++, including garbage collection, and the fact that Java is platform independent. Another major difference between the languages is that Java is a WORA language, while C++ is a WOCA language. Java and C++ also share several similarities in their syntax, as both languages were influenced by C (“Cornell.edu” n.d.). Given that both languages are object-oriented languages, they are guaranteed to have many similarities, however, the current differences between the two languages is exceedingly evident, and will be continuously increasing for years to