by Dinesh Thakur Category: Java Evolution

C++ and Java both are Object Oriented Languages but some of the features of both languages are different from each other. Some of these features are :

o All stand-alone C++ programs require a function named main and can have numerous other functions, including both stand-alone functions and functions, which are members of a class. There are no stand-alone functions in Java. Instead, there are only functions that are members of a class, usually called methods. Global functions and global data are not allowed in Java.


o All classes in Java ultimately inherit from the Object class. This is significantly different from C++ where it is possible to create inheritance trees that are completely unrelated to one another.


o Java does not support multiple inheritance. To some extent, the interface feature provides the desirable features of multiple inheritance to a Javaprogram without some of the underlying problems.


o Java does not support operator overloading.