First language : JAVA
Second Language : C++
Major Difference :
1. Platform Dependency :
Java is platform independent which means that its code can be run on any machine. It uses JVM ( Java virtual machine ) which converts the code in byte form and then run it which makes it flexible enough to be used on any system. So .exe file can run on any OS.
C++ is not platform independent and thus its .exe file cannot be run on different OS.
2. Objects
In JAVA everything is reference typed and is inherited from the class objects that are predefined in it.
In C++ not everything is class or reference typed.
3. Garbage Collector
Java has built in garbage collector when we use classes in java.
C++ make developer to collect garbage when he uses reference types like pointers.
Why choose Java and C++ ?
People are very confused about the platform in-dependency of JAVA, so i decided to choose Java and compared that concept with c++ which is mother of all languages.