SIGN UP MEMBER LOGIN:    
ARTICLE

Six Java features C# developers will kill for...

Posted by Ran Kornfeld Articles | Java and .NET July 06, 2006
Not everything on the .NET framework is perfect, and Microsoft still has more improvements to implement. This time we will look at six features available to Java developers but unfortunally absent from C#.
Reader Level:

In the last article from June 21, I gave six features that are available in C# but not in Java and can make Java developers jealous of their C# friends. I got responses from readers about the article, and decided that I must also show the other side of things.

 

So, being a long time Java developer I will show some loyalty to the (great) Java language and present six features that we have in Java, and we wish we had in C#.

 

Here they are:

  1. Stronger enums - In C# enums are just constants with an integer value. Oh yes, you can also use other integral types (byte, long, etc.). In Java enums can have constructors, methods, implemented interfaces and abstraction. This gives the enum feature great flexibility and allows the programmer to create smarter and more powerful enum uses.
  2. Checked exceptions - Only after you taste them, you understand the power of checked exceptions. We are basically lazy creatures and when something is not required, we just might not do it. So exceptions are thrown all over but no one knows (unless you love reading the small letters in the MSDN documentation). Try-catch? Naaa, it won't happen to me...
  3. SDK sources - Where the hell is the .NET SDK sources? It might sound like a strange wish but being a Java programmer I am used to browsing the SDK sources, looking for examples and learning from the implementations. I found it very helpful and it sometimes can even help in resolving strange behaviors encountered. A penny for someone who can tell me how the .NET ArrayList class is implemented internally ("using an array" is not an answer).
  4. Smarter IDEs - I must tell you that before I started using Visual studio I thought it is the best IDE available. This was probably true 3-4 years ago. But today, Java IDEs (mainly eclipse and IntelliJ) are so smart, they make the programmer look dumb. These IDEs can do everything except coffee, although I am not sure about the planned features. It almost seems they write the code for you. Visual studio has a long way to go, even the 2005 edition.
  5. Open source free projects - I love free stuff. Everyone loves free stuff. Java developers love free stuff, and will probably find free stuff they can use in their own projects. Hundreds of free, open source, production level Java frameworks, tools and components.  C# developers will pay.
  6. The Apache Software Foundation - This organization is responsible for the success of 80% of Java related projects. You can always trust their Java projects to save you when you come across some nasty requirement. 

I guess there is no perfect language. Each one has its own stronger features, and things we wish it had. What's left is for you to decide, and I know it might be harder than it looks.

Login to add your contents and source code to this article
share this article :
post comment
 

IntelliJ is not bad, it's made by the same people who make Resharper for visual studio and a lot of the same features are included in the product. (Heck you can even use the same keystrokes. And ReSharper makes Visual Studio a good product.

Posted by Mike Gold Dec 31, 2010

I agree. This article is old. Visual Studio 2010 is a much better product than Visual Studio 2003 and 2005.

Posted by Mahesh Chand Dec 31, 2010

This article is more than 4 years old. VS has come a long way since than and I agree that VS2010 with some add-ons can match eclipse and intelliJ in some aspects.

Posted by Ran Kornfeld Dec 31, 2010

I have been a java and .NET developer / Architect for almost 10 years. I use Eclispe, NetBeans, Intellij and Visual Studio all day everyday. Trust me Visual Studio is in a class of its own. Those others cannot hold a candle to Visual Studio. I like java and .NET but Visual Studio is far better. No question about it.

Posted by Bryan Latimore Dec 31, 2010

mike - did you ever used eclipse that you are blaming the author that he is kidding you ??? Im using Eclipse and VS 2005 every day because Im Java and C# programmer. Eclipse for several years, VS for ~1year, maybee more, so I think I can say something about it without ridiculous flames - I have to agree with author of this article, Eclipse is much better IDE and VS can learn very much from it although there are some things VS can do better (for example autocomplete is smarter in VS)... Eclipse is unbelievable piece of software and it's pleasure to work with it.. Without Resharper from JetBrains it would be pain for me to work with VS because even with Resharper installed, Eclipse is much better in refactoring and further things and details that make programmers life much easier... also what Im missing in VS is some free subversion plugin which can be compared to great Eclipse plugins like Subversive and Subclipse... because I think ankhsvn for VS is inactive piece of crap... Im not saying VS is bad, it's great IDE but Eclipse is much better... believe me or not, I dont mind, because Im using both every day :)

Posted by pablo May 14, 2007
Nevron Gauge for SharePoint
Become a Sponsor
PREMIUM SPONSORS
  • ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications.
    ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications. Visit DynamicPDF here
Nevron Gauge for SharePoint
Become a Sponsor