45.7k views
4 votes
Pick two programming languages. Please describe: - The major differences between those two languages; and - If you were assessing an application and determining what language would be best for the programming, why you would choose each language.

User Cesare
by
7.4k points

1 Answer

1 vote

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.

User Artsin
by
7.3k points