Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

In order to make a choice for future what will be good Java or C Sharp? Now a days there are many jobs in C# and many clients are moving towards .Net(as MS is providing support). I have heard that Java is very slow as compare to C#. I have worked in C++ and VB but now i want go for Java or .Net its getting quite complex to decide help me out here. Thanks

share|improve this question
What kinds of apps do you want to write and for what platform? Web? Desktop? Games? Mobile phones? Windows? Linux? – Kramii Dec 24 '10 at 7:15
@God_Damn_Coder : How do you tell that Java is very slow compared with C#? – Kugathasan Abimaran Dec 24 '10 at 7:36
@ Krami : when i was working with VB6 i developed lots of windows apps. In future i want to work with Web Applications, Distributed apps. I am working as QA but i want to move to development thats why i want too choose one language – CodeCracker Dec 24 '10 at 8:38
@abimaran : Thats why Java is loosing its customers in corporate world, I heard that slow thing from many people – CodeCracker Dec 24 '10 at 8:40
6  
@God_Damn_Coder: Don't let the performance thing be your reason for choosing, because it's probably not true. Take a careful look at the claim, and you will find that the performance argument has been going back and forth for years. There is virtually no-one in the corporate world who would have the ability to settle it one way or the other. The bottom line is: good code is fast, no matter which language you write it in. – Fritz Meissner Dec 24 '10 at 9:10
show 2 more comments

closed as not constructive by Mark Trapp Dec 19 '11 at 17:28

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or specific expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, see the FAQ for guidance.

8 Answers

up vote 1 down vote accepted

The first thing you need to learn when needing to make these kind of decisions, is to actually investigate things for yourself, instead of just relying on what other people say. The reason for this is naturally because this is what you are expected to do in your future professional life.

Saying "Java is slow compared to X" literally begs for you actually controlling it.

But to give you an idea of what you basically need to choose between:

  • C# is primarily used for server side and desktop application on Windows.
  • Java is primarily used for server side applications where platform independence is important.

This is the really major differences. Except for those C# and Java are quite similar.

share|improve this answer
@ Mr. Andersen : I got it dude. I think thats what i was missing anyways i asked for your valuable opinions and i am happy you people made lot of things clear – CodeCracker Dec 24 '10 at 11:51
@God_Damn_Coder, if you really "got it" then you should perhaps consider rephrasing your question. – user1249 Dec 24 '10 at 11:56
Thanks everyone every single confusion is cleared, i chose to develop in both choose C# for windows application and Java for everything(Web, Api's etc). Java has got no limitation, .Net does. I want to go for Cross Platform life isn't all about windows. YOU ALL helped me a lot especially Ravn Andersen, Fritz, Philippe and Karamii. Thanks a lot every one, may god bless you all. – CodeCracker Dec 24 '10 at 14:38
@God_Damn_Coder, a good decision. Note that it takes a lot of time and hard work to achieve mastery. Good luck. – user1249 Dec 24 '10 at 23:11
Thanks Ravn, thanks everyone hope we will be in touch so that i can learn more from you people – CodeCracker Dec 25 '10 at 5:55
show 2 more comments

There's plenty of work for talented developers in pretty much any development platform, especially C# and Java. They are both well supported by large communities and have excellent tool support.

Truly I don't think anyone can honestly say you will have a better carreer if you pick one or the other, so you might as well flip a coin.

share|improve this answer
1  
Thanks Conrad, i flliped a coin (Head==Java and Tails== .Net ) and its .Net – CodeCracker Dec 24 '10 at 8:42
1  
Good choice mr coin! – Philippe Dec 24 '10 at 9:43
3  
I don't agree. I think someone is likely to have a better career if they would choose the platform they liked the most. – Daniel Dec 24 '10 at 9:47
2  
Project Coin?.. – user1249 Dec 24 '10 at 11:11
Ultimately it won't matter anyways since I suspect that we'll eventually start to leave those languages behind us like Fortran, COBOL, and C++ are being displaced (Yes, there's still active development all over the place in all of them and yes there's gazillions of lines of code, but available jobs for them are on a downward trend while Java and C# are currently still rising). – Brian Knoblauch Dec 29 '10 at 14:20

It is a difficult choice. My criteria would be:

C#

  • Both the language and core framework regularly updated and enhanced
  • Core language more advanced
  • Has the weight of Microsoft behind it
  • Very strong for windows desktop development
  • Good libraries for distributed applications
  • Everyone uses the same basic tools (Visual Studio + .Net framework)
  • Easier migration path from VB6 (via VB.Net)
  • I get the impression that the market for C# skills is growing faster than that for Java (but I might be mistaken, especially as Android is gaining so much ground).

Java:

  • More stable core platform
  • Lower cost development tools (free!)
  • Lower cost hosting for web applications (you don't need Windows servers)
  • Wider choice of IDE and other tools
  • Better cross-platform support
  • Community quicker to embrace new techniques and methodologies

For my money, I'd choose C#. I must admit that I'm biased, however: I have limited experience with Java, have have been .Net developer for some years, and I'm not really bothered about targeting non-Microsoft platforms (because my employer isn't).

At the end of the day, however, I don't really think that Java development and C# development are that different. Whichever you choose, I am sure you will have a long and lucrative career.

share|improve this answer
1  
Development tools are free for C# too. But there are also paid options, as there are for java. – Alex Budovski Dec 27 '10 at 5:02

For Java:

  • Extremely innovative community pushing the boundary on what is possible with 3rd-party libraries and frameworks
  • Android and Java ME = 2-0 on the mobile platform (Windows Phone 7 is not yet an option)
  • "Openness" (although this is under threat from Oracle)
  • Strong backwards compatibility means that legacy code will be out there basically forever
  • Greater range of developer tools
  • Free

For C#:

  • Less obsession about backwards compatibility means that it's easier for MS to add new features and probably more fun to work with for developers
  • Corollary to the above: ahead of Java in the core language features
  • Way ahead on the desktop front (if you like Windows).

If I were starting my career now, I would probably go for C#, but it's close. Knowing what I do now though, I would be careful about sticking to anything for too long. You may find yourself in a position where you can't switch to whatever the new hotness is because you've spent too much time mucking about with the languages of the 1990s and 2000s. It could well be that whatever the next big corporate language is has already been invented, and you might wake up one morning and find yourself ten years behind.

share|improve this answer
@ Meissner : Thats True, Oracle is really a threat to Openness of java as it will try to get some standards. I will go for both but as of now .Net will be better as we have lots of experience developers in Java, For me .Net is the perfect platform to proove myself – CodeCracker Dec 24 '10 at 9:09

I swear that once you learn one you can easily transfer to the other. I was a Java dev about 10 years ago when the .COM implosion hit and hesitantly went to my first C# interview. The biggest issue is different casing (in Java it's toString(), in C# it's ToString()).

share|improve this answer

It depends where you are now, but to me it's a matter of personal taste.

I started my career 4 years ago, and I had the opportunity to do both Java and C#, and as of now I spent equal time on each. My personal choice lies with C# as I'm more generally interested in the .NET world as a whole. I don't know why, it's a guts feeling I have.

There is a lot more than just the programming language itself, there is all the community and all the products that revolves around the platform. If you try both (and actually work with both), you will get invaluable experience that can be leveraged later as a great asset (I crossed a lot of people that only did .NET or only did Java). Doing both will lead you to a position where you know what you talk about and give you a lot of insight if you have to make them work together at some point.

So my advice, based on what I did, is to try both and see which one you prefer. Don't base you choice on the current market.

share|improve this answer
@ Philippe : True i will have to focus on both; but what about ASP.Net and JSP i think for web development i will have to focus on one. By the way coin stuff was a joke :-P – CodeCracker Dec 24 '10 at 10:23
Yeah I got that, but as I prefer .NET I said it was a good choice :) As for ASP.NET vs JSP, well, you know where I stand... – Philippe Dec 24 '10 at 10:46
@ Philippe : And where do you stand Philippe with ASP.Net? – CodeCracker Dec 24 '10 at 11:47
Well, as I'm with .NET, I stand by ASP.NET and not by JSP :) – Philippe Dec 24 '10 at 12:05

You're forgetting that you can use .NET in C++.

That way, you don't even have to learn a new language at all.

share|improve this answer

I would go for java, as it's features are more stable, and there are more tools and libraries that target it even if C# and .net is a breath of fresh air, C# is gaining a lot of strange features in the core language compared with java... One of these days you won't even know if C# is based on OO, functional or a completly different paradigm. And java is more stable about that.

Also for the ones that say that desktop programming is more easy with C#, lets say that I would prefere swing to WPF or Windows Forms 1000x.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.