Saturday 21 June 2014

Difference Between C++ and Java

Difference Between C++ and Java

C++ Java
1. C++ is an extension of C with Object oriented behavior , C++ is not complete object oriented language as Java. 1. Java is complete object oriented language.
2. C++ supports pointer concept. 2. Java does not support pointer.
3. At compilation stage C++ source code converted into machine level code. 3. At compilation stage Java source code converted into byte code.
4. C++ is platform dependent , you have to compile and run program for different platform. 4. Java is platform independent language so you can compile once and run any where.
5. C++ uses only compiler. 5. Java uses both compiler and interpreter.
6. C++ supports operator overloading. 6. Java does not supports operator overloading.
7. C++ supports multiple inheritance. 7. Java does not supports multiple inheritance.
8. Goto statements available in C++. 8. There no goto statements concept in Java.
9. C++ supports :: scope resolution operator. 9. No :: scope resolution operator.
10. C++ does not have garbage collector concept. 10. Garbage collector is most useful feature of Java
11. C++ does not support final keyword. 11. Java supports final keyword.
12. C++ supports constant keyword. 12. Java does not supports constant keyword.
13. C++ uses #include to include different files. 13. Java uses import keyword to include different classes.




0 comments :

Post a Comment