Difference between cpp and java.
Difference between c++ and java |
Difference between c++ and java
C++ | Java |
---|---|
1) C++ is platform-dependent. | 1) Java is platform-independent. |
2) C++ is mainly used for system programming. | 3) Java is mainly used for application programming. It is widely used in Windows-based, web-based, enterprise, and mobile applications. |
4) C++ was designed for systems and applications programming. It was an extension of the C programming language. | 4) Java was designed and created as an interpreter for printing systems but later extended as a support network computing. |
5) C++ supports multiple inheritance. | 5) Java doesn't support multiple inheritance through class. It can be achieved by using interfaces in java. |
6) C++ supports operator overloading. | 6) Java doesn't support operator overloading. |
7) C++ supports pointers. | 7) Java supports pointer internally. we cannot declare explicit pointer. |
8) C++ uses compiler only which converts source code into machine code. | 8) Java uses both compiler and interpreter. Java source code is converted into bytecode at compilation time. The interpreter executes this bytecode at runtime and produces output. |
9) C++ supports both call by value and call by reference. | 9) Java supports call by value only. There is no call by reference in java. |
10) C++ doesn't have built-in support for threads. It relies on third-party libraries for thread support. | 10) Java has built-in thread support. |
Comments
Post a Comment