Sunday 9 June 2013

C++ vs Java

Tags

1. C++ supports procedural programming, functional programming, object-oriented programming, generic programming, and template metaprogramming. Favors a mix of paradigms. Java strongly support object-oriented programming paradigm.
2. Java does not support pointers. In C++, 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 inheritance.


EmoticonEmoticon