3 ms·
I'd argue that C++ is weaker than Java, although both have the concept of types. If you cast from one class to another, C++ will do it without hesitation. Java
by qznc 11y ago
I'd argue that C++ is weaker than Java, although both have the concept of types. If you cast from one class to another, C++ will do it without hesitation. Java will do a runtime check and throw a ClassCastException if it fails.
- kylebgorman 11y agoC++ has both checked casts and unsafe casts.