C# and Java are both general purpose programming languages. There is nothing stopping you from trying new things. One is not better than the other, it is a matter of taste. Learning both languages at the same time is both possible and will teach you similarities and differences of two very similar programming languages. Furthermore, you will learn the concepts of programming in general more thoroughly learning two languages compared to one language at a time.
C# has more features than Java but nothing critical. If you got bored with Java you will also get bored of C#, or any other programming language. I'd simply find a new book or start different project but stick with Java.
Both languages are great and have a huge selection of learning materials.
It really, really doesn't matter which one you pick.
i think c# provides things that might arent critical to be missed on java, but u will miss it in other languages, once u used it.
dear Liv3,
while java is platform independent and very slow c# will give u a syntax-similar language that is very very comfortable, fast, and strong in (only) the microsoft environment. i dont want to refer to mono yet, cuz its similar but different libs.
c# is using the .net libs, so u can do many high things with few lines codes. c# even can be used in the asp system of microsoft (web development). hell c# can even be used to develop games (xna is dead, but look at unity3d). by using the .net u can many pros like the ADO.NET entity framework (a framework that builds entity classes from your database, for every table one class, and allows u to work with linq expressions without writing one line SQL, so its simpler and easier, i.e. no more sql injection protection needed ... microsoft does the job ... and more).
then, how about building a windows service and the client to communicate with (WCF services)? very easy with c#.
i was able to build my own mini tcp chat service + client and could chat with myself by starting multiple instances of my client app. learning those took me just 2 weeks, and thats what i love about ms. microsoft cleary tries to hold everything similar (like winform to web development).
the only thing u must learn is to become a slave of ms. :S
C# and Java have similar syntax and pretty much do the exact same thing, C# has its advantages and disadvantages just like Java.
Hardcore reading: Comparison of C Sharp and Java - Wikipedia, the free encyclopedia
If you would have read this wiki link, you wouldn't say they "do exact the same thing" ;)
After working a little with C#, you probably wouldn't want to go back to Java, because it's lacking a lot of nice features (just to name a few: LINQ, properties, lambdas, delegates/events, yield-keyword, true generics...).
There are a lot of very stable things for every coding language, I think it doesn't matter THAT much.
We sail onwards. We don't know where we'll end up, but we'll go where the river takes us. Past everything we fought for, past all memories, onto something new. You'll be missed, my old friend, but it's time to part ways.
So overall as far as I understood from comments. C sharp has a slight advantage vs java.
As always, the answer would depend on what one wishes to accomplish.
Stop learning languages (for the sake of a language itself), people, and instead focus on what you want to create.
Bow down before the one you serve.
its huge not slight. :P
thats the final point that is the most important, but since i work on my company i only go for microsoft lol. as long as u accept users using windows not mac or linux its very interesting to go for microsoft. they provide so many solutions in their own cycle u dont have to go out of your lovely enviroment (visual studio):
- for javascript we code typescript
- for websites we use asp.net (c# and markup)
- for applications we use wpf and winforms (c#)
- for services we use WCF (c#)
- for SQL we use the c#'s entity framework (MSSQL)
so its good to decide your language on your project, but u should keep in mind that there are technologies that work rly good together in harmony. if u start something with microsoft its better to stay on microsoft on other projects that are bound to your first project. =)
Personally, when I'm just trying to do something really fast and simple, like a 15-45 minute parser or some crap like that, I use Java, just because it's a bit more forgiving, and in a small project it's nicer about the exceptions it throws. When I'm actually trying to do something worth a crap, I usually go for C#. Java's nice and all, but like... it's really not powerful enough to do anything, mostly because even something as simple as Hello World requires loading up the entire JVM. Also, and this is just my feeling, Java actually seems more... primitive? Iunno.
Like a lot of people said already depends on the project you are working on, but if it's meant to work on windows machine definitely choose C#.
Because it's a .NET language, a lots of libs and code is already done for you, with a few lines you can do so much. C# is vital for Microsoft's projects so the support won't die, neither will the language, so if you want to learn a future language, C# is one of them.
C# also has similar syntax to other modern languages, while Java is old and a bit rusty. Java is wide spread but seeing how fast technologies are developing, Java is not really a language you want to focus on(although there are projects that requires Java).
Anyways, you should really not focusing on a certain language, but more on Algorithmics and how to get things done. You'll once learn that jump from one language to another will take you a few weeks tops, meanwhile Analythical skills take a hell lot longer.
Java and C# are actually, in the grand scheme of things, very similar at a language level. Not particularly surprising when you consider that C# syntax was largely based on Java (with various additions). Skills in one mean that you will become proficient in the other pretty quickly (took me only a couple of weeks to switch either way), and it looks good on your resume not to be seen solely as a "one technology person".The Java platform is great and has a lot going for it. The engineering in the JVM is amazing, there is a fantastic ecosystem of open source libraries, the tooling is excellent (Eclipse, Maven, EGit are the ones I use most), you can write genuinely cross-platform solutions, there's a huge amount of innovation happening (especially in the framework and new-JVM-language space). Sure it's different from the Microsoft stack, but is certainly at least as good overall.