Possible Duplicates:
Should I learn C# or Java?
Should freshers learn Java or C++?
I have an option of selecting Java or .NET as my language.
Which one is the best to choose? In which can I see a brighter future?
Possible Duplicates:
Should I learn C# or Java?
Should freshers learn Java or C++?
I have an option of selecting Java or .NET as my language.
Which one is the best to choose? In which can I see a brighter future?
Noone knows which one has the brighter future (apart from Jon Skeet). And what is better is a personal / subjective question. Personally i go with java. But C# has some very neat features and i plan to learn it too. Nothing against knowing one more language :).
Java implementations support more platforms. Note that's not a property of the Java language. It's merely a property of the implementations. But mono already works quite well on three quite major platforms and it can compile C# code for Linux/Windows/MacOS.
Learn C# from dot net and also Java If you master one of these, you are cool.
It would be interesting to see which of the two seems to have the larger question/answer audience on SO.
Fortunately, they are similar enough that techniques and patterns you learn for one are usually transferrable to the other.
They are both really great languages!
I would learn both, master one, then learn ruby || python || groovy || scala to round it out. Problem with .Net and Java is that they are both Monolithic languages with lots of ritual and things you need to do that don't always make sense until you understand how compilers and type checking really work.
Learning a great dynamic language will improve your Java or C# thanks to the DSEP (Dynamic side effect phenomenon) where learning about duck typing, polymorphism and other dynamic nuances actual improves your statically typed OO code.
Then again C# will support native Duck Typing in 4.0 along with some great functional programming paradigms so I would start hedging my bets on that one over the big J.
Learning both only opens more doors for you in the future. If one is becoming less popular, you will still have something to fall back on. It's almost inevitable that you will learn a second language anyway as your first language is rarely your last, and having a tough decision between these two I feel you will end up learning them both somewhere down the road anyway. Not to mention how many resources there are out there for helping programmers of one language convert to another, a quick search on Amazon will reveal a myriad of books for Java developers wanting a taste of C#, and the other way around. More knowledge never hurts, as long as it's useful knowledge.
Look at the number of Java programmers envious of C# and compare it with the number of C# programmers envious of Java. Compare the numbers and decide. (I'm sure most people know which group has majority.)
Start with C# and then learn Java.
I find it easier to set up the C# developer environment - Visual Studio. There are probably more jobs about for C#.
That said, Java is very useful, particularly on Linux and for general portability. Mono is good but not as mature as the Java implementation currently.
I'm fairly fluent in both Java and C#. I think any programmer who can become solid in one language the translation to the other language is fairly simple. The main difference is one of integration. It's harder to integrate Java into the Microsoft world and C# (much less so now than before) is harder to work with outside of the Microsoft world. Once Mono catches up with .Net 3.0 I would be hard pressed to say that Java has the edge.
When I am working in Java I miss the ease of which I can work with web applications and web services. When I am working in C# I miss the myriad of libraries that make development speedier and much more effective. I especially miss Javolution when I am working with C#.
Learn C# first then start tracking some Java open source projects and you'll see how easy it is to code in both worlds.
Fortunately Java and C# are very alike, so it is not difficult to pick up the other after learning one of them. I suggest you start by learning the language where you can find immediate use for it. Real projects are needed for real experience with a language imo.
C# seems to be evolving more quickly than Java. I don't know if this is good or bad. If you know C# then you can pick up Java pretty quickly and vice-versa. The libraries take a longer time to learn than the languages.
I think they are so similar that it's not really an either/or. I'm currently learning Java for Android development (started with c# about 5 years ago) and I'm finding that it's easy to pick up.
You want to branch out? Try a functional language. That will bend your brain around nicely. F# would be my choice, since in .NET you can include C# and F# assemblies (or is it by class?) in the same project. There are some things that functional languages really do do better. Or at least easier on the dev, since it all goes down to bytecode in the end.
I would advise to go with Java first. C# is very rich as a language (IMHO), up to the point that I actually find it confusing for new developers. On the other hand, Java has a relatively concise syntax. So I'd advise to go with Java first.
I wouldn't be talking about libraries here, because these are tools that can enhance your productivity, but are not actually part of the language. There are also many debates that can be made over GUI libraries, platform independence, multiple vendor support, and many other stuff. But if you really want to learn well, then I would advise you to start by learning the language itself, and know about libraries on your way. Afterwards, you will be able to switch to the other language relatively easy.
By the way, I am not saying that C# is bad (regardless of my personal opinion). I am just saying that its richness can make it hard to learn for new developers.
One thing about Java is everything is free. With Microsoft, I assume you end up paying somewhere along the line. Another thing is Java runs on both Windows and Unix. I don't think C# does this. Finally - a quick check of Dice.com reveals approximately double the postings for Java as it does for C#. I can't vouch for the trend, though.
Look at job postings in your area. Learn whichever one seems to be more popular. It really doesn't matter. I'm a Java programmer, but I've looked at a fair bit of C# code and it seems very similar; I don't think I'd have any trouble picking up enough to be productive in a few weeks.
Right now .Net is the more dynamic place to be - Java's ability to run on anything also makes it harder to change. Meanwhile Microsoft can keep adding to .Net very quickly.
You can use .Net on Linux, but you're tied to an old subset of the language.
In either case it will take longer to learn what you can and can't do with the supporting frameworks than the language itself. Also bear in mind that C# basically robs the best bits from Java - there's not a massive difference between them.
I wouldn't bother learning both - very very few jobs require it. In terms of your career you're better off learning some different but complementary languages.
I would go with SQL, either C# or Java, and finally plain Javascript with at least one framework (jQuery, prototype, etc).
Basically, to me as a hiring manager, C# + jQuery or Java + SQL would both be worth more than C# + Java.
I would choose Java... Here's why (don't downvote please, I'm not trying to start a holy war, just pointing my observation)
Hope this helps.
Learn Java.
And then learn Scala.
Scala is sufficiently different that learning both is not redundant, and sufficiently close (Scala can use Java's libraries) that you can leverage your knowledge of the vast APIs available for Java.
Scala is also pretty far ahead in terms of language innovation.
i would learn .net first since majority of jobs are in .net right now and then do java
You should be able to Hello World in both. Many people I know end up having to learn the other later. The question is really, "What should I learn right now?"
What do you develop on/for? .NET is highly integrated with the Microsoft web stack. Java is more cross platform.
Then you make a decision, "Do I want to learn the thing that deepens or broadens my experience?"
Generally, I want to broaden my experience when I'm learning. That's because I'm not a Java or C# developer.
I am just a developer.