C ++ vs Java series -- Introduction, vsjava
Introduction
After studying Java for many years, I have now learned the path of C ++. Although Java is still my favorite, many problems with C ++ remain unchanged, which is still difficult to use, this is not flattering, it makes people feel stuck, but I will continue to learn it, which not only enhances my viability, more importantly, I can see the origins of Java. How does Java get nutrients from C ++ and discard their disgusting contents, become a mature and excellent object-oriented language.
C ++ was born in 1983 and is an inheritance and development of C language. It can be oriented to procedural or functional programming like C, or object programming, it is a type of C language, strong-type language, and compiled high-level language with a certain degree of cross-exaggerated platform and portability. C ++ has made many enhancements to the C language, but it still cannot change its features closer to lower-level languages than other object-oriented languages. Therefore, the cost of C ++ learning is high. You need to understand the underlying mechanism, memory management, and allocate and recycle the memory by the programmer.
C ++'s inherited development tools are relatively easy to use, such as VS and QT Creator. However, compared with Java's integrated development tools, such as eclipse and idea, they seem to be far behind, C ++ programs often need to be compiled and executed to detect code errors without thinking about the powerful code prompts of eclipse. eclipse can write programs while implementing them, while checking for code errors, programs with no errors in the writing phase can basically be executed normally.
C ++ does not have as many open-source frameworks and libraries as Java does. As a whole, C ++ development is more difficult than Java, and the development speed is far slower than Java. However, the fast operation speed of C ++ balances its compilation speed.
C ++ is mainly used for the development of desktop applications, embedded systems, mobile terminals, drivers, and operating systems. Java is divided into JavaSE for desktop development, JavaEE, enterprise project development, JavaME, embedded, and mobile development.
Java was born in 1995 and is a pure object-oriented high-level language that absorbs the advantages of C ++ and discards many disadvantages such as multi-inheritance, pointers, and global functions in C ++, java Virtual Machine (JVM) based on different platforms has the features of one-time writing and running everywhere, and has high platform portability. It can be either a compilation language or an interpreted language, this is because the Prime Minister first compiles the source code into bytecode and then loads the bytecode to the Virtual Machine for running. In the virtual machine, it can be either pure interpretation or pure compilation, it can also be interpreted and executed in part, and compiled and executed in part. In addition, Java can automatically allocate and recycle memory, which basically does not require interference from programmers, greatly reducing the pressure on programmers.
The two languages C ++ and Java can be used for parent-child relationship, with many inheritance and variations. In the future, C ++ and Java will be compared and analyzed.
If any error occurs, please forgive me or criticize and correct it. Thank you very much. Please respect the author's labor results, reprinted please indicate the original link: http://www.cnblogs.com/Isen/p/6683438.html