C++ vs Java have different design goals. Just like C++, Java is also statistically typed object-oriented programming language with a similar with an incompatible syntax. Java has extensive documentation as well which is known as Javadoc.
C++ uses pointers while Java does not involve pointers. Java uses the concept of ‘restricted pointers’. A C++ program is run and the compilation is done using its compiler. The compiler in C++ converts source code into machine level language which makes C++ a platform-dependent language. In Java, java source code is first converted into bytecode at the time of compilation. This bytecode is then interpreted by the interpreter and runtime to produce the output that makes Java a platform-independent language.
C++ does not provide built-in support for threads whereas Java support threads implicitly. Though in the latest implementation of C++11, it does have support for threads as well. Java is much like C++ but does not involve complex concepts like structures, operator overloading, pointers, templates, unions, etc. Also, Java doesn’t have support for conditional compile (#ifdef/#ifdef type).
Every entity is an object in java except fundamental types. Java has a single root hierarchy as everything emerged from java.lang.Object.
Comments
Leave a comment