How Java differs from C and C++
Java and C
Java and C
• Java does not include the C unique statement keywords sizeof and
typedef.
• Java does not contain the data types struct and union.
• Java does not define the type modifiers keywords auto, extern, register,
extern.
• Java does not support explicit pointer.
• Java does not have a preprocessor and therefore we cannot use #define,
#include statement.
• Java adds many features required for Object oriented programming.
Java and C++
• Java does not support Operator overloading.
• Java does not have template class.
• Java does not support multiple inheritances of classes. This is
accomplished using a new feature called “interface”.
• Java does not support global variables. Every variable and method is
declared within a class.
• Java does not use pointers.
• Java has replaced the destructor function with a finalize() function.
• There is no header file in Java.
•