Saturday, March 30, 2013

Difference between C++ and Java

           Java is developed from C and C++. Java is most popular  Object-oriented language.It is a platform independent language. It is used for developing web applications,distributed applications, enterprise applications,etc.

           C++ is an extension of C language.C++ is also object-oriented language but not pure..It is a platform dependent language.It is used for developing desktop applications,drivers,etc.

                 The following are difference between C++ and Java

1. C++ isn't a strictly type-safe language and it supports automatic conversion and truncation. Java is strictly type-safe language and only automatic widening support.

2. C++ has no support for enforced-bound checking whereas java enforces strict bound-check mechanism.

3. C++ support multiple inheritance and java doesn't support multiple inheritance.

4. C++ has a limited set of libraries when compare to java libraries.

5. C++ has a support unsigned arithmetic where as java  doesn't have any such support.

6. C++ support operator overloading but java doesn''t support.

7. C++ requires explicit memory management whereas java has autometic garbage collector for memory management.

8. C++ support call by value and call by reference.But java support only call by value.

9. C++ allow direct call to native  system libraries wheras java uses java native interface to achieve this.

No comments:

Post a Comment