Following features of C++ are not there in Java.
No sizeof operator
No scope resolution operator
Local variables in functions cannot be static
No Multiple Inheritance
No Operator Overloading
No preprocessor and macros
No user suggested inline functions
No default arguments
No unsigned int in Java
No -> operator in java
No stack allocated objects in java
No delete operator in java due to java’s garbage collection
No destructor in java
No typedef in java
No global variables, no global function because java is pure OO.
No friend functions
No friend classes
No templates in java
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
- Comparison of static keyword in C++ and Java
- Comparison of Exception Handling in C++ and Java
- Does JVM create object of Main class (the class with main())?
- 10 Most asked Questions from Java Programmers
- Are static local variables allowed in Java?
- Java | How to start learning Java
- Java | MIDI Introduction
- JavaFX | CustomMenuItem
- JavaFX | ComboBox with examples
- StrictMath atan2() Method in Java