Skip to content

Latest commit

 

History

History
31 lines (16 loc) · 1.13 KB

Things_Only_Present_in_C++_AND_Not_In_JAVA.md

File metadata and controls

31 lines (16 loc) · 1.13 KB

There are many features that can be seen in C++ but not in Java. A few of them have been listed below −

  • No unsigned int option in Java

  • No destructor in Java as well as ‘delete’ since garbage collector performs this operation for it.

  • No friend classes or friend functions in Java.

  • There are no pointers in Java.

  • There is no typedef option in Java.

  • Since Java is a purely object oriented language, there are no global variables or global functions.

  • The concept of templates present in C++ can’t be found in Java.

  • The ‘::’ scope resolution operator is not there, since there is no question of global variables or functions.

  • The concept of multiple inheritance can’t be found in Java, there is multi-level inheritance though.

  • The concept of operator overloading can’t be seen in Java.

  • There are no default arguments in Java.

  • C++ has inline functions, i.e small functions that are expanded within the code, but not in Java.

  • There is no preprocessors and macros in Java.

  • Java doesn’t have a sizeof operator.

📍For more differences click here