Java is simple to understand because it eliminates lot of confusing properties like pointer, operator overloading, header files, goto statement etc.
When we compile Java code it generates byte-code that can be run on any operating system.
Java is a pure object-oriented programming language. It is totally based on object and class. It follows all basic concepts of OOP e.g. inheritance, abstraction, encapsulation and polymorphism.
Java doesn’t support pointer, so without authorization we cannot access memory location. It also uses some cryptography for data security. JVM provides a virtual machine for running the Java programs.
It is one of the most important features of Java as it follows ‘write once and run anywhere’ function. After compilation Java code gets converted into byte-code and this code can run on any operating system.
Java is a multithreaded programming language because it allows multiple tasks to be performed simultaneously to share the same memory.
Java uses strong memory management which is handled by automatic garbage collection. Exception handling provides the code checking mechanism.
JIT compiler which interprets the Java code into byte-code will increase the performance of java.
Java can carry lots of information on run time as it provides a link on different classes and objects dynamically.
Java compiler accepts the source code, converts it into byte-code and in second stage it converts into machine code with the help of interpreter.
For sending the tabular format between remote components to distributed application JDBC RowSet is used as it provides direct access to the database.
|Java does not support pointer.||C++ supports the pointer concept.|
|Java doesn’t support structure and union.||Structure and union are supported in C++.|
|Header file is not required. ||Header file is necessary in C++.|
|Java does not support operator overloading.||It supports operator overloading.|
|Java uses finalize() method for memory cleanup.||C++ uses destructor for memory destroying.|
|Java is pure object oriented language.||C++ is only an extension of object oriented language.|
|Java does not support multiple inheritance.||Multiple inheritance is supported by C++.|
|Java does not support global variable.||C++ supports global variable.|
|Java uses instanceof operator for identifying an object.||instanceof operator is not available in C++.|
|Write once, run anywhere (WORA).||Write once, compile anywhere (WOCA)|
|Java has no goto statement.||C++ has goto statement.|
|Java supports documentation comment.||C++ does not support documentation comment.|
|Java doesn’t have any preprocessor.||Preprocessor concept is available in C++, so it supports the #define or macros.|
|Java uses right shift operator (>>>) for inserting zeros at the top end.||C++ uses right shift operator (>>).|
|Java supports the multithreading concept.||C++ does not support any built in function for multithreading.|