0% found this document useful (0 votes)
5 views

How Java Differs From C and C++

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

How Java Differs From C and C++

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 3

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.

You might also like