C++ VS JAVA Which One Should You Learn ?
If you are someone who is into the software industry then the 2 prominent names you probably heard of are Java and C++ ( Of course there are other prominent names like Python, etc,. they are not much of a concern in this article). So, which one should you learn and master ? this is a common question. One is not a complete replacement for the other here, so each of them their own characteristic features. Nevertheless to mention learning one of these languages would make learning the second one Hell lot easier.
Here are some differences between these two.
JAVA VS C++
- Java is Platform independent. That is same Java code can run on any OS( Windows, Mac OS, Linux ). While C++ is Platform dependent.
- Java applications or code runs on Java Virtual Machine(JVM) while C++ code runs directly in the Operating System.
- Java does not have the concept of pointers which C++ has. The reason why Java choose not to have pointers is, usage of pointers is very prone to errors( They say so).
- Java has no operator overloading. C++ has facility for operator overloading.
- Java has Garbage collection, while C++ doesn’t.
- Templates are not available in java but C++ has templates.
- Global variables are not available in Java. But C++ has global variables.
After reading the above lines you might think, well.. it’s a Tie then. Sorry to say this I am being as unbiased as possible but Java has a little upper hand over C++ in total as Android adopted Java.
- C++ was designed for systems and applications programming, extending the C programming language. To this procedural programminglanguage designed for efficient execution, C++ has added support for statically typed object-oriented programming, exception handling,scoped resource management, and generic programming, in particular. It also added a standard library which includes generic containers and algorithms.
- Java was created initially as an interpreter for printing systems but grew to support network computing. It was once used as the base for the “HotJava” thin client system. It relies on a virtual machine to be secure and highly portable. It is bundled with an extensive library designed to provide a complete abstraction of the underlying platform. Java is a statically typed object-oriented language that uses similar (but incompatible) syntax to C++. It was designed from scratch with the goal of being easy to use and accessible to a wider audience. It includes an extensivedocumentation called Javadoc.
Hope this article helped you. If you have any queries, please comment below
Like us on Facebook to get daily dose of Awesome stuff
No comments:
Post a Comment