Java API and Microsoft's .NET API: a Comparison
Nerval's Lobster writes "Previously, developer Jeff Cogswell focused on the respective performances of C# and Java. Now he's looking at yet another aspect of the languages: the runtime libraries—what exactly the libraries are, how they are called, and what features the languages provide for calling into them. Examining the official Java API (now owned by Oracle) and the official .NET API owned by Microsoft, he finds both pretty complete and pretty much a 'tie' with regard to ease-of-use and functionality, especially since Java version 7 release 6 allows for automatic resource management. Read on and see if you agree."
Microsoft also had the benefit of Java going first and making all the mistakes, and then Microsoft got lucky when Java lost its first-mover advantage chasing down several blind alleyways -- "Applets", Sun's mismanagement, a bureaucratic open source strategy.
Don't blame me, I voted for Baltar.
I am both a professional java and C# developer. Each one has their advantages:
On the C# camp:
* delegates and events
* functional constructs
* automatic variable types
* LINQ
* Value types (efficiently allocate thousands of value objects in an array, you need some really nasty workarounds in java)
* Generics that keep their types at runtime
On the java camp:
* Spring (There is Spring.Net, but lets be honest: it does not compare)
* Collections library (much more complete and better thought out than C#'s)
* Maven
* J2EE
* A million other libraries freely available, that do _anything_ you want.
* Portable to more platforms (Mono sometimes leaves something to be desired)
So in my humble opinion, C# is much more complete as a language, but java has much better libraries and community. So which one would I pick? well, it depends on the project, the platform, and the amount of code I can reuse from open source libraries.