Java and C++

Although Java was modelled after C++ languages, it differs from C++ in many ways.


  • Java does not support operator overloading
  • Java do not have template classes as in C++
  • 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 and forms the part of that class
  • Java does not use pointers
  • Java has replaced the destructor function with a finalize () function
  • There are no header files in Java



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s