Programming - C# vs Java

Ok ok, i'll back C# here. It's the most amazing language you'd be a fool not to use it!!

Actually I won't (waits for gnome's shock and awe:P ). I'd do what one of the other posters here mentioned, and pick a new language for a hello world app (c, c++, java, C#, VB.Net (basically C# copy pasted), PHP), and do the following:

1. Compile a "hello world" app for each (it may take you a bit of time to get through this step as there will be applications to install)
2. Set up a small UI for each (not just console). This can include a button, label and list perhaps. (Remember, in C# this could be winforms (grey boring) or WPF (will take a little longer but is far more flexible), ASP.Net (no need to do this till a little later on - it's for the web) or XNA (leave this for when / if you want to make games for your xbox)
3. Read and write to a text file
4. Connect to a database (mySQL and Sql Server Express) and read a row from a table

In my opinion, only once you have done each of these tasks will you know what languages are best to move on with. Some people jump up and down for java, then realise that it's not exactly a cake walk trying to set up a fantastic looking UI (enter WPF). Others will say .Net all the way... until they need to deploy to a linux OS, iOS or Android, at which point they need to start looking at tools like mono (monoTouch or monoDroid) (which don't allow Silverlight or WPF).

Point is, a hello world application alone will not help you. The languages are all about the same when it comes to that... it's the other stuff that sets them apart.

This shouldn't take that long either. All the info is out there. Good luck.
 
Wow, there seem so to be a lot of people here who feel that
Code:
simple == bad

I have to disagree with this; there should be less focus on how easy or difficult a language is to learn for the beginner. Sure, it's a factor that certainly plays a role, but it should not get more attention than the features that a particular language offers.

SLAQ, as Lounger says, multiple inheritance was intentially omitted from the language in favour of interfaces. I happen to think that interfaces are a pretty neat way to accomplish most things that would otherwise require multiple inheritance.

"rarely make use of abstract classes"?? Are you kidding??

And let's not get into the performance aspects. Let's see; show of hands for who thinks wins when it comes to processing performance?

Short-term computation?
Long-term computation?
 
C# > Java and if anyone tells you otherwise they are LYING!!! :p

Either way, since you are still going to study this in university it doesn't really matter what language you pick. They all do the same things in the end - they all loop through stuff and print text out to consoles etc - it is just the syntax that differs.

But pick C# (or Python) mmmmmm'kay?
 
No one says anything about career/work opportunities here. I find that today your career choice more especially in this field should be influenced by the current job/skills demand. Java will surely get you more Job opportnunites than C#/C++ today IMHO
 
No one says anything about career/work opportunities here. I find that today your career choice more especially in this field should be influenced by the current job/skills demand. Java will surely get you more Job opportnunites than C#/C++ today IMHO

Way more jobs available for C# developers...
 
I suppose we can conclude by saying the op should get a nice little project and use both languages and see which one he likes.
 
Thought better pay was relative ....

Better paying if you have the experience. For junior developers there are more C# jobs (IMHO) and I'm pretty sure that Java jobs will require more and more senior devs because let's face it, it is kind of becoming the new COBOL, init?
 
... it is kind of becoming the new COBOL, init?
hahaha! i don't think just yet. i think it's still 50% of market share in terms of companies that use it as a dev platform, especially with mobile dev soaring.

If you're looking at entry level jobs, which the OP will be, then uh it doesn't matter what language you do or don't know. If you have the requirements for the job (some sort of tertiary qualification in computers) then the employer doesn't expect you to have 3 years experience in Java or C#. He expects you to learn on the job. MS still has uhhhh 85%+ market share. And will have for a long long time. Mobiles on the rise yes, so Java will have a ton of work too. And once you have 2-3 years of either, then there are probably equal opportunities, at which point you want to develop in Python rather.
 
hahaha! i don't think just yet. i think it's still 50% of market share in terms of companies that use it as a dev platform, especially with mobile dev soaring.

If you're looking at entry level jobs, which the OP will be, then uh it doesn't matter what language you do or don't know. If you have the requirements for the job (some sort of tertiary qualification in computers) then the employer doesn't expect you to have 3 years experience in Java or C#. He expects you to learn on the job. MS still has uhhhh 85%+ market share. And will have for a long long time. Mobiles on the rise yes, so Java will have a ton of work too. And once you have 2-3 years of either, then there are probably equal opportunities, at which point you want to develop in Python rather.

Good points, but I don't understand why should one move to python development? Thx
 
Well, after reading every post, looks like everyone have their own experience and recommendations when it comes to chosing a programming language.
So it all comes down after-all to own preference?
 
I did Java in school, and C++ at uni...can't speak specifically about C# but I know it's similar.
Truth is I found them both similar, and had preferences for both.

But I think I did some cooler stuff with Java back in the day, that was more platform independent.
Also, looking to the future of android devices being so popular, I'm thinking java is the way to go.
 
I would find out which ever language you are most likely to use the most of / the one that will count the most next year at Uni, and get some practice in that.

Will def help next year.

I'm not a huge fan of Java, I often find design patterns being used needlessly and too much unnecessary abstraction.

C# will be much easier to get into if you are coming from a Windows background, Java will probably be easier from a *nix background.

Not sure why all these people are suggesting picking up C++ as a self taught first language - you are most likely going to get despondent before achieving anything. Its a wee bit ridiculous to me. Have any of you had experience teaching different languages to students without a programming background ? Most of the supposed benefits to be gained (better understanding of behind the scenes etc) will most likely go over the head of a self taught learner until they have put in a massive amount of effort.

I would definitely recommend C#.

At work we currently have several different languages in use (including Java, C, C# Python etc) all being developed by the same set of devs. What language you decide to use really depends on what you want to do and what platform you want to do it on. No matter how much we might like language A, there are just some things that are better done in language B.

As much as I dislike Python in my personal opinion (whitespace instead of curly brackets etc) I often end up using it, whereas you won't find me churning out code in C/C++ as it is just a PIA to achieve things that could be done quicker and just as good in other languages. Unless you are developing for embedded systems or HFT you can usually just ignore the performance penalties of coding in a "higher" language - writing better code outweighs the optimisation to be gained from a different language anyway. (And yes, on the occasion we do pull out the C/C++ but it needs good reasoning for it)
 
So to my conclusion, I should Start with C# and then move Java (So I can do some multi-platform programming) , or other way around?
 
Top
Sign up to the MyBroadband newsletter
X