Should I learn Java or c#?

Should I learn Java or c#?

I have been coding in JS all my life (although I did PHP earlier), but I feel it is time to learn a new language and I’m torn between Java and c#. Any suggestions?

1 Like

They are very nearly identical. There are more free resources out there that teach Java, but I find C# to be a nicer, more polished language.

It also seems like Java is more versatile when it comes to applications. Case in point mobile development and web development.
Thanks for your reply.

I’m not actually familiar with java frameworks but c# has .net and .net core with mvc and web apis for web development and xamarin for android. Admittedly you can’t write native code in c# though.

If you want to learn raw OOP and design patterns, Java is perhaps the best place to start because most books and resources are written in that language. Also if you feel like doing some big data or wanna try out stuff like Spring Boot for web dev. Not to mention most people still code in Java when it comes to Android (altho there is Kotlin and hybrids these days).

C# every year has better and better syntax and sugar. It’s a great language and its MVC framework is battle tested, has great coverage out there so you might get a job ez. It’s also great to start with desktop and windows 10 apps using XPF or WinForms.

Their syntaxes are similar so learning one will facilitate the learning curve of the other.
I personally started with C# but went to learn java in 2 weeks.

I would go for Java.

Java and C# syntaxes have much in common. So, after learning Java, it will be easy for you to switch from Java to C#.

1 Like

I would suggest you to go for C#, but if you are a beginner in the world of coding/development, then you should start with C then progress to C++ and finally C#. There is a reason to start with C, its that even though C is very primitive when it comes to programming languages out there, but its still very help full in making programming concepts strong.

Then go for C++, the reason to chose this programming language now is that after learning C you will be probably aware of many basic C operations, now you can start to learn and understand object oriented process using C++.

Once you get proficient in C++, then go for C#, mind here you will get to know many new things, but this will all be based on your previous understanding.

Also most of the programmers I know say that C# is easier to learn, understand or code then C or C++, but the truth is that nothing in this world is easier, these guys had a very good understanding of both previous languages, and C# which was made to be friendly, seemed like a cake to these programmers. Also do check out this awesome article: What Is Coding? to further strengthen your basic concepts about coding before actually starting to do it.

There is absolutely no need to learn C or C++ before any other languages. And while some C knowledge might come in handy for some of C++, they are completely different languages. And C++ is completely different than C#.

You can learn C# as your first language, and many people do. Don’t waste your time with prerequisites you’re not actually interested in.