0
Why Java is considered better than C++?
is it true in all fields?
2 Answers
+ 1
No, It's not true in all fields. Java and C++ are two different things, hard to compare.
Java is used to develop Mobile Applications (Android, J2ME), Server-side web applications, and Desktop Applications. It's widely used in research. In java we can 'write once, run anywhere'. It's not suitable for compute-intensive applications.
Most desktop software we use daily are written in C++. It is widely used to teach programming. Supports pointers. Most compute-intensive applications are written in C++. It was multi platform, but we have to recompile it for each platform.
C++ code is compiled as Executable Machine Code, and runs as a Native Application.
Java code is compiled to 'byte-code', and runs inside a Virtual Machine(JVM).
- 3
Java is a C++ extension. So, with Java, you can build more type applications, e.g Web Applications.