In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article is to share with you about the difference between Java and C#. The editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.
Recently in the study of C #, never thought, will also learn C #. In learning C #, I found that C # is really a good thing, in the object-oriented process, C # is more superior.
One of the differences between Java and C#:
There are still int, boolean, long and other basic types in java, but in C #, int,long itself is a class, and during the transformation from string to int, you can directly use int.TryParse () or Convert directly.
The second difference between Java and C#:
C # adds "attributes", "delegates" and so on, which greatly simplify the writing and understandability of the code. The concept of "attribute" and structure in the definition of the class may be that I have learned VB before, so I am very sensitive to the concept of attribute. "attribute" always makes me feel that the idea of "WYSIWYG" is closer, and I am particularly willing to learn C #. When I started to learn "attributes", I didn't understand the retention of the word "value". Compared with the basic knowledge of the Java language, I found that "attributes" in C # is the abbreviation of the get and set methods of member variables. So value is an incoming parameter. Many object-oriented languages have something in common. I was asked to learn Java. Although I learned the basics of Java well, I was only amazed at the use of Java in various architectures, so I felt that it was easy to learn something I was familiar with in C #. The "delegate" in C# comes from the function pointer in C++, which solves the handling of concurrent events and accepts this idea easily.
The third difference between Java and C#:
The "input and output" section in C# is relatively simple. Usually a basic class can find the desired method, but Java sometimes has to go through several layers of encapsulation, which makes me a little confused.
Although C# makes me feel close, the various mature architectures of Java are unmatched by C#. Java's Spring and Struts architecture makes the writing process of the project particularly clear.
The above is the difference between Java and C#. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.