Java vs C#

Started by
17 comments, last by jpetrie 14 years, 8 months ago
I understand it's always difficult to choose between languages, I also understand one is probably better off learning more than one. C# and Java seem so similar- I'm studying them parallel to one another but, when it comes down to it which one will be around longer? Everything comes to an end. Java is older by a bit but, there seems to be far more support for it. C# is younger but, it has far less literature on the subject. What are the pros and cons of each language (Besides the obvious)? Why does Java have so much support and literature? Is C# just taking off? And what about Sun suing MS over Java? I couldn't fully grasp that.. Please enlighten me. And no convincing and converting- I'm gonna learn both regardless. This is simply to gain perspective.. I've already come so far with Java and will continue until I'm very fluent, the similarities make it easy to hop to C# whenever I want.
Advertisement
hi,
i am sure this is not the first post about java vs c#, please use the search functionality for this forum :) now, this being said, i want to state my own opinion, the only major difference for me between the languages is that java is multiplatform. so, i think the question is if you are looking for a job as a programmer, are java programmers more wanted or C# programmers.

one more thing from my own exp, Visual Studio is a better IDE than Eclipse, again it's my own opinion, dont spit on me , you java-gurus (:

have a nice day!
I haven't used neither C# nor Java at work (apart from a few quick C# utilities) but I'd say the current situation is as follows:

Java:
- mature cross-platform library support
- popular in the enterprise field due to many large-scale frameworks
- popular in the server field for various reasons (among these, because it runs on non-Windows nodes (no, Mono doesn't cut it))
- runs on many cellphones.

C#:
- great
- but only really on Windows
- I like it more than Java (partly because I got fed up with Java buzzword-complient bloatware frameworks).
- .NET apps feel more natural on the desktop than Java apps. Wouldn't think twice about using it in Windows-only environments.

Wikipedia:
C# vs. Java
.NET vs. Java

[Edited by - Konfusius on August 6, 2009 3:01:20 AM]
A few more personal opinions:
-C# (and the whole .Net API) is growning amazingly fast, while Java was kind of in a fronzen state untill c# came out.
-C# is usually used with .Net, wich is a powerful api. One of the best things about it is that it can be programmed against many languages seamlessy.

I think that C# and .Net are designed better than Java (of course, C# creators were able to learn pros and cons of Java choices).
There are also things where I prefer java:
-I never used Java in the last few jears, but I think I like Swing more than WinForm, from what I remember.
-It is supported by many (most?) enviroments. Mono is not bad, but in my experience it still has problems with .Net 2.0, and now is going to be released 4.0. So for a true multiplatform too I would most probably use Java.

Today I'm under the impression that .Net developers have more chances to find a job, so I suppose that if you know C# you know at least part of .net, then I bet that if you learn C# you have more job options :-)

Of course, those are my personal opinions...
Quote:Original post by cignox1
Today I'm under the impression that .Net developers have more chances to find a job, so I suppose that if you know C# you know at least part of .net, then I bet that if you learn C# you have more job options :-)


It depends on the work field. I (personally) would favor .NET for homogenous Windows environments and Java get's the rest.
If I were to argue for which is "better" according to each language's own merits and framework, I would prefer C#. .NET as a whole is a pleasure to use.

Java's strength comes from its ubiquity. There's a Java VM written for practically every platform under the sun, whereas .NET is fairly limited in where it can run.
NextWar: The Quest for Earth available now for Windows Phone 7.
As educated in both Java and C# i would like to say:
I rather drive a taxicap than working with java.
Enough said now you guys allready figured out that im a regular fanboy and it would require a great deal of bribe to make me change my mind.

Now to the reasons why:
* C# is being compiled in to CIL, which can be run by any .Net interpretator. (A bit like the java language) Many Linux products have beta versions of CIL interpretators that you can run allso with mac. So no reason to praise java because of Cross Platform. Though the .Net is still on a beta stage on most platforms it is there.

* C#'s editor can be downloaded for free. Though in a light version it is good enough for making fun small home projects. Where you would feel a bit cut off with the free editor if you have been using the enterprise you will still figure out that you got the most basic. This is specially handy if you are making visual apps, as the eclipse visual editor is close to crap.

* I should fill a table from a database once using both languages. The C# code took me 3 lines and 15 minutes on google to figure out how to do. The Java i spent 2 weeks, several classes and i dont know how long time to make.

* "But your friend is a java freak and he promised to help", Good bring him along. There is something called J# that is a close to be java. Any java users can use the editor, and language without sitting down and having to relearn everything. And it conmpiles in to CIL, guess what. You can use the same DLL's for the same project. (Same counts for VB.Net.)

* But java is more safe! Nope (and then again), would be the same statement as saying linux or mac OS would be safe. Noone cares about linux or mac. As 85% of all computer users use Windows you hit a bigger target. JSF is more safe though because as soon as you fiddle with the documents the server crashes. Noone can hack a crashed server :)

Just my pow of java vs. C#
Quote:Original post by magic-mouse
* C# is being compiled in to CIL, which can be run by any .Net interpretator. (A bit like the java language) Many Linux products have beta versions of CIL interpretators that you can run allso with mac. So no reason to praise java because of Cross Platform. Though the .Net is still on a beta stage on most platforms it is there.

Yeah but Java support is much more mature. Also, .NET doesn't run on many smartphones.

Quote:
* C#'s editor can be downloaded for free. Though in a light version it is good enough for making fun small home projects. Where you would feel a bit cut off with the free editor if you have been using the enterprise you will still figure out that you got the most basic. This is specially handy if you are making visual apps, as the eclipse visual editor is close to crap.

It's not crap. Visual C# Express is nice though.

Quote:Noone cares about linux or mac.

I'm a web developer and we deploy about 10% of our apps to Windows vs 90% Linux. It's not only about the desktop (though probably it's the context here). In any case you can't ignore Mac, it's very profitable to develop for.
Having and currently programming in both these languages the most obvious things that pop off the top of my head are:
Java by default comes installed on all Mac computers and used to on Windows until the lawsuit thing. Also that's why J#(Microsoft's version of Java) development stopped and I wouldn't use it since it's not supported anymore.
C# has way easier GUI programming support via winforms. It's just drag and drop almost like VB was. Haven't seen anything as easy with Java.
Otherwise, alot more is the same between the languages than differnt than most care to admit so I don't know why all the hate against Java?
Oh the other big difference is that C# actually let's you use pointer directly using unsafe code unlike Java so Java seems more protective of the programmer kinda like your mom telling you what to do so maybe that's where the hate comes from LOL?
Both should be around for a while since Microsoft and Oracle(I think they own Java now?) have quite a bit of resources to pour into their future if they care to.
[size="2"]Don't talk about writing games, don't write design docs, don't spend your time on web boards. Sit in your house write 20 games when you complete them you will either want to do it the rest of your life or not * Andre Lamothe
The Java vs. C# question isn't really about languages. It's about the frameworks/platforms.

My opinions...

As far as Java vs. C# for GUI programming, forget comparing Swing to WinForms. Check out .Net's WPF/XBAP/Silverlight technologies. They are XAML based and blow Swing and WinForms out the water. Microsoft's upcoming Visual Studio 2010 is a WPF app. It's kind of a HTML meets Flash meets WinForms kind of thing.

As far as games go I'd say XNA has no match, and it looks like Microsoft is serious about evolving it moving forward.

For server-side programming it's probably a wash right now. Perhaps a little easier on the Microsoft side.

For multi-platform, it's Java ahead by a mile.

For careers in programming, I would pick C# at this point.

This topic is closed to new replies.

Advertisement