Home > software development > Java versus C#.NET

Java versus C#.NET

I have been working on an article for a Swedish computer magazine. The article is to compare Java and C#.NET. In the writing process I have gone through lots of material, mostly articles found on the Internet.

So far the quality of those articles have been varied. Most of them are old and to some extent out of date. But there is one that is high quality: A Comparison of Microsoft’s C# programming language to Sun’s Java programming language, by Dare Obasanjo. This paper was originally written in 2001, but has been updated in 2007 to include the latest changes. If you are either a Java or a C# programmer and have little or no knowledge of the other, that article is all you need to catch up.

During my work on the article of my own, I have come to the conclusion that there are very few major differences between the two platforms. In fact, there is only one difference that makes a difference: Java supports multiple platforms, while .NET supports multiple languages.
In theory .NET could be as platform independent as Java, but the way the .NET Framework API is designed it makes a complete port difficult, although the mono project is definitely an interesting attempt.
On the other hand, in theory Java could be language agnostic too. And there has been attempts to target the Java Bytecode, but no successful ones. Sun doesn’t seem interested in these projects, and are not giving them any official support. The problem lies in the fact that Java Bytecode was not designed to support multiple languages, the main goal was for it to be compact and take little bandwidth when sent over a network. And Sun cannot make major changes to it’s bytecode due to backward compatibility issues.

The bottom line in my article research is this: C#.NET is the best platform for Windows based systems since it was in fact designed for it. Java on the other hand is the only option for systems that are targeting other operating systems.

Categories: software development Tags:
  1. jos
    August 31st, 2007 at 15:36 | #1

    But aren’t groovy and jruby officially Sun supported languages targeting Java bytecode ? And lets not forget scala which is gaining momentum.

  2. September 1st, 2007 at 22:25 | #2

    jos: You are right of course, and the mono-project are closing in too. Soon there will be no significant difference between Java and C#. Both will support multiple languages on multiple platforms.

  3. Wasif
    January 6th, 2009 at 11:28 | #3

    it was a good article but iwant to which language should i learn for a career in softwares c#.net,vb.net or java please reply,thank you

    • January 11th, 2009 at 19:37 | #4

      Thank you Wasif. That question is a difficult one. I’d say Java or C# if you want the most mainstream, but then again you’ll have the biggest competition. The best thing you can do is to learn the fundamentals of software development and not focus on a particular programming language. Go for a formal education in computer science. That way you’ll get the broad base you need to be a great software developer.

  4. wasif
    January 12th, 2009 at 11:34 | #5

    thank you sir for your suggestions,i want to know what are subjects to focus on software basic.

  5. anchit
    March 25th, 2009 at 06:53 | #6

    thanks for the info.

  6. Someone
    August 25th, 2009 at 11:46 | #7

    @wasif
    You need to focus on Software Engineering issues, analysis, Design Patterns, etc, this is the real thing which differentiates a piece-of-art, quality-made software among other one, Then learning a programming language won’t take very much, However its always advisable not to switch between languages a lot, because when you spend a considerable time from your life with one language you know it more deeply, which will help you to produce more optimized and creative codes.

  7. Michael
    April 17th, 2010 at 01:31 | #8

    Awesome paper! It would great to see this updated.

  1. August 22nd, 2007 at 11:54 | #1