In this comparison, we hope to find out their respective shortcomings and improve them. We also hope that we can add them together. This is purely a technical discussion, so fans of extreme. net and java can ignore it!
Let's talk about IDE comparison, that is, comparison between eclipse and:
1. eclipse supports highlighted display in variable context, which is not supported until 2010;
2. eclipse double-click the left curly braces to automatically select the content to be included. It is a good news for a large part of if... else;
3. eclipse plug-ins are richer;
4. The region code block management function in VS is available in eclipse. It is really a bad old code...
5. The Smart Tips of VS are superior and complete;
6. eclipse automatic error correction is easier;
At present, I think of so many things for the time being. These may have a great impact on daily practical use. Wait for the audience to add them!
Next is the comparison between C # And JAVA at the language level. after net 3.0, the language level is much more elegant (even if some are syntactic sugar), and more functional programming usage, such as LINQ and lambda, will not be compared. Why? Because JAVA seems to be unable to compare anything, it is said that scala and other java platforms are much better than this, but it has never been used yet. We look forward to catching up with JAVA ~! Here we mainly compare their basic frameworks, basically the comparison between. net2.0 and jdk1.6:
1. JAVA must process declared exceptions in the Code. Otherwise, compilation fails. This is a poor design for evaluation. Although it helps improve program robustness, but it also hides some problems. I personally think this design is very good in server programs. At least your service will not be terminated due to an exception.
2. In terms of member visibility, JAVA is visible to the package by default, which reduces encapsulation to a certain extent. In addition, the protected modifier is visible to the package and subclass in JAVA, and the. NET modifier is visible to the subclass only;
3. the JAVA reflection mechanism has read and write restrictions. You need to call the setAccessible method to grant permissions. In my opinion, this is a little tricky;
4. The class file in the jar file can be replaced to implement partial update, which is very useful in some cases;
5. The interface name in the JAVA base class library or JAVA code specification cannot be seen at a glance as an interface. For example, the interface in. net will fix the first letter as I;
6. Enumeration design in JAVA is cumbersome, and static constants are used in many cases. In contrast, enumeration in. net is more intuitive;
7. JAVA simply designs generics into a syntactic sugar;
8. There is no value type concept in JAVA. Basic types such as int and byte are not native objects and need to be packaged, resulting in Map <Byte, string> the result of using an int key = 1 to search must be NULL. This must be criticized even if the MAP contains data with KEY = 1;
9. There are static methods in the method table running on the instance call, which may lead to confusion;
10. Compared with. net, time operations in JAVA are troublesome;
11. It is very convenient to perform unit tests in JAVA. A main function can be added for each Class. Although. net can also be used, configuration is relatively troublesome;
12. The configuration of environment variables in JAVA is probably a nightmare for many new users.
Finally, no matter which language, I think people have preferences. This is fine, but it is not good if you belittle others unless you have the ability to invent your own language.