tags:

views:

203

answers:

2

It is said that Java overcomes all disadvantages of C++

Disadvantages of C++:

  • Does not provide very strong type-checking. c++ code is easily prone to errors related to data types, their conversions, for example, while passing arguments to functions.
  • Does not provide efficient means for garbage collection, as already mentioned.
  • No built in support for threads.
  • Gets complex when u want to develop a graphics rich application in c++
  • portability of code on various platforms, etc

Then why is there a need for C++ language ?? Why cant we just use Java for all programming purposes??

+1  A: 

This may be a better question for Wikipedia to answer than here.

http://en.wikipedia.org/wiki/Comparison_of_Java_and_C%2B%2B

Rawheiser
+4  A: 

Simple answers: Because memory management is hard, and the java standard library is pretty good.

Colen
True for C++, but not C#. C# memory management is similar to Java, and .NET Framework is pretty good also. I'm not (necessarily) saying that C# is preferred over Java, just that these reasons are valid for C++, but not C#.
franji1