Diffrence Between Java & C++
Introduction of Java
Java is a platform independent and ure object oriented programmig language. It was developed by
James Gosling and Patrick Naughton of Sun Microsystems, USA in 1991.
It was Originally called
OAK and this language was renamed as "Java" in
This language was designed to be simple and platform- independent(which was not dependent on any particular hardware or operating system) that had been developed with the main objective of making the programming for the internet faster and easier.
This language has bright future due to its four distinct features, namely object oriented, platform independent, Intenet support and security.
The java programs developed exclusively for the internet, which are well known as applets can now be effortlessly distributed to many users over the internet.
Introduction of C++
C++ is a high-level programming language developed by
Bjarne Stroustrup at
Bell Labs in
1980. C++ extends object-oriented features. It is very similar to C (invented by Dennis Ritchie in the early 1970s).
➦Java is also an object-oriented language.It is a single root hierarchy as everything gets derived from java.lang.Object.
➦Java is mainly used for application programming. It is widely used in window, web-based, enterprise and mobile applications.
➦It was designed as an interpreter for printing systems but later extended as a support network computing.
➦Java doesn't support the goto statement.
➦Java doesn't support multiple inheritance through class. It can be achieved by interfaces in java.
➦Java doesn't support operator overloading.
➦Java supports pointer internally. However, you can't write the pointer program in java.
➦Java is platform-independent.
➦Java uses compiler and interpreter both.Source code is converted into bytecode.
➦Java supports call by value only. There is no call by reference in java.
➦Java has built-in thread support.
➦Write once run anywhere everywhere
➦Support object-oriented programming model.
➦Java support automatic garbage collection. It does not support destructors as C++ does.
➦In Java, try/catch must be defined if the function declares that it may throw an exception.
➦only supports method overloading. It does not provide support for operator overloading.
➦It does not support any structures.
➦C++ is an object-oriented language. However, in C language, single root hierarchy is not possible.
➦C++ is mainly used for system programming.
➦C++ was designed for systems and applications programming.
➦C++ supports the goto statement.
➦C++ supports multiple inheritance.
➦C++ supports operator overloading.
➦C++ supports pointers.
➦C++ is platform dependent.
➦ C++ uses compiler only. C++ is compiled and run using the compiler which converts source code into machine code.
➦C++ supports both call by value and call by reference.
➦C++ doesn't have built-in support for threads.
➦Write once compile anywhere
➦Allows both procedural programming and object-oriented programming.
➦ C++ supports Object-oriented features Procedural programming features.
➦In C++, you can't include the try/catch even if the function throws an exception.
➦C++ supports both method overloading & operator overloading.
➦It supports structures.