+ 3
Ways not to Confuse Java with C++
Do you have any idea not to confuse Java with C++? For example, we use “:”to inherit classes in C++, while we use “extends” in Java. Thx!
1 Réponse
+ 3
1. Relate : with C++
and extends with Java because Java was created to extend the usage of C++
2. Also, your class definition ends with a semicolon but in Java, no semicolon is used.
C++:
class{
};
Java:
class{
}
3. No pointers in Java like C++ because Pointers point directly to a memory block, which is not secure.
4. Java has Collections Framework and C++ has Standard Template Language
5. C++ has friend function because C++ was lonely.
Java is famous, so no friends are required.