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.

 



About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.



Search Content