Joke Collection Website - Public benefit messages - The difference between JAVA and C++

The difference between JAVA and C++

Java and c++ are closely related. Many people think that java is a simplified version of c++ with virtual machines. In this way, learning c++ after learning java can let us know what simplification java has made compared with c++. Especially in the aspect of object-oriented characteristics. C++ can realize some features of functional languages, especially it has function pointers and can pass functions as objects. If java does this, it needs to write a "function object", which is not very direct. But the intention should be the same. Abstraction is similar, and the same function java can be implemented with interfaces. ) We noticed that the process control statements of java and c++ are very similar.

On the other hand, it is necessary to know the complexity of c++. It has something to do with the position of c++ in the industrial field. And the special level and function represented by this language. Then java loses a lot of flexibility after simplification. But it increases simplicity and convenience. It is also relatively pure in design. However, the language style is relatively fixed, and the style of the class library is relatively consistent. But both languages are mature languages and have been used in industry for many years.

Learning C++ is not an easy task for java programmers. But it is helpful for programmers to understand many mechanisms of the programming language itself. Especially in object-oriented. C++ is complex and weak, so programmers need to be extra careful. In this sense, C++ is like Lin Daiyu, beautiful, fragile, difficult to understand, but very talented. Like Xue Baochai, Java is beautiful, generous, caring, sensible and caring, but not flexible enough.

On the other hand, the class library of c++ language is very rich, and its cross-platform performance is good. Running speed is fast. Flexible. So it is necessary for us java programmers to learn c++.

In addition, C++ has not yet withdrawn from the industrial field, and there are quite rich applications, all of which are using c++. I recommend you to see QT. In the field of games, you can take a look at irrlicht. These can be used as the starting point of learning, can make something with a sense of accomplishment, and is also an encouragement to learning. Especially QT.

Finally, java has been criticized on the UI. Especially the swing is complicated and slow. Looking forward to javaFX. In addition, there are many other languages on the java virtual machine, and you can learn scala.

Finally, many people compare java with c++. I don't think it makes much sense. No matter which one is better or stronger, wouldn't it be better for us to learn? Wouldn't it be better for us?

Last but not least, I want to send you a word. As the old saying goes, skill is not overwhelming.