-
-
Lecture1.1
-
Lecture1.2
-
Lecture1.3
-
Lecture1.4
-
Lecture1.5
-
Lecture1.6
-
Lecture1.7
-
Lecture1.8
-
Lecture1.9
-
Lecture1.10
-
Lecture1.11
-
Lecture1.12
-
Lecture1.13
-
Lecture1.14
-
C++ vs Java
1. C++ supports procedural programming, functional programming, object-oriented programming, generic programming, and template metaprogramming. Favors a mix of paradigms. Java strongly supports object-oriented programming paradigm.
2. Java does not support pointers. In C++, the pointer is one of C++ most important language features. It is also one of the most dangerous if used improperly.
3. C++ has deterministic destruction; Java does not. Deterministic destruction is useful for managing resources. In C++, when objects are deleted, their destructors are executed immediately.
4. Java has built-in multithreading support. There’s a Thread class that you inherit to create a new thread (you override the run( ) method).
5. In Java, all classes inherit from the Object class directly or indirectly. Therefore, there is always a single inheritance tree of classes in Java. Unlike C++, It supports both single and multiple inheritances.