In this blog we will discuss the differences between java and C++
Sun microsystems Inc. has divided java in three parts-
- C++ is not pure object oriented programming language,because it is possible to write a program without using class. Whereas Java is pure object oriented programming language,because in java we cannot write any program without a class.It needs atleast one class.
- Pointers are available in C++ whereas in Java we can use or create any pointer.
- In C++, User has to allocate or deallocate memory locations itself Whereas in java allocation and deallocation of memory is the responsibility of JVM.
- C++ has goto statement.But Java does not have goto statement.
- Multiple Inheritance is available in C++.In Java no multiple inheritance is possible.
- In C++ Operator overloading is possible. But in Java Operator overloading is not possible.
- #define, typedef and header files are available in C++. Whereas in Java #define,typedef and header files are not available but there are means to achieve them.
- There are mainly three access specifier in C++:- private,public,protected. Whereas in java there are four access specifier :private,public,default and protected.
- In C++ Constructors and destructors are available. Whereas in Java only Constructors are available.
Sun microsystems Inc. has divided java in three parts-
- Java SE-It is the Standard Edition which contains basic core Java classes.This is used to develop standard applets and application.
- JavaEE-It is the Java Enterprise Edition which contains classes that are beyond Java Se.It concentrates on providing business solutions on network.
- Java ME- It is the Java Micro Edition.It is for developers who developes code for portable devices.Code on these devices are vewry small and take less memory.
But i think JAVA is not at all pure OOPs language.....
ReplyDelete