How is C# different from Java? In what ways is it better?
C# is essentially Microsoft's answer to the need for a compact, powerful, object-oriented language that supports easy programming of Web interactivity, either on the client side (what Java calls an applet) or the server side (what Java calls a servlet). C# differs from Java in syntax, reserved words and in some areas of functionality. It most notably differs in its support for the Windows APIs, which were also added to Microsoft's implementation of Java, J++. It became the foundations for Sun's claims that Microsoft was corrupting the platform neutrality of Java. This claim ultimately led to Microsoft's decision to abandon Java (in the wake of a lawsuit that found that Microsoft had indeed violated Sun's Java License by adding support for those APIs to its implementation). Thus, some might say that C# represents a new version of C++ designed to compete with Java, but also a language that Microsoft controls and can therefore lash up tightly to the Windows APIs. Microsoft claims that C# is better than Java because it:
* Supports Rapid Application Deployment (RAD) technologies
* Supports cross-platform deployment (a claim viewed with skepticism by Java bigots and those outside the Microsoft camp)
* Provides access to native platform resources (the Windows APIs, in other words)
* Support for COM and .NET platforms (more proprietary Microsoft technologies. This fact is important to those inside the Microsoft development world, annoying or downright irritating to those outside it)
However, not everybody agrees with these claims and this is a very contentious subject. Let me therefore point you to some further reading so you can make up your own mind on this subject:1. For a pro-MS view, please read: http://www.javaworld.com/javaworld/jw-08-2000/jw-0804-itw-csharp.html
2. For a pro-Java rejoinder, please read: http://www.javaworld.com/jw-11-2000/jw-1122-letters.html
3. A nice comparison of C# to C++ and Java (but still somewhat MS-biased): http://genamics.com/developer/csharp_comparative.htm
4. A cool collection of side-by-side listings in Java and C# that shows (at least to me) that they're more alike than different: http://www.ddj.com/ftp/2001/2001_02/csharpj.txt
5. Great list of C# articles and references: http://www.dur.ac.uk/~dcl0bjc/bookmarks/CSharp/ If you visit your favorite search engine, and search on "C# versus Java" or "Java versus C#" you will come up with all kinds of additional resources on the subject, many of them highly inflammatory. This is a hot subject, with many sharp and opposing views on both sides.
Dig Deeper on IT Career Development and Training
Related Q&A from Ed Tittel
You don't have to break the bank when it comes to finding resources for managing Windows Server.continue reading
Easier file access across devices and faster Windows 8 startup are among the Windows 8.1 features that could win over Windows 7 users.continue reading
As the Windows 7 end of life arrives, IT admins must find extended support for the OS. Microsoft provides some help, but it won't always be free.continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.