9 Answers
+ 11
Having worked with both languages extensively, I believe C# is hands down a much better language than Java.
I will need to find my previous posts where I've listed the the reasons.
In the meantime, I've enjoyed this side by side comparison of C# with Kotlin. It does make references to Java as well. So, at the very least, I highly recommend watching this video.
https://youtu.be/pR8zPYlNU0k
The code comparisons start at around 7 minutes.
Here are some other articles that seem more accurate that many of the biased articles I've seen online.
https://en.wikipedia.org/wiki/Comparison_of_C_Sharp_and_Java
https://blog.overops.com/c-vs-java-5-irreplaceable-c-features-wed-kill-to-have-in-java/
+ 14
I'm coming at this from a Java advocate perspective. I think if you want to be a good Java coder you should have some C++ and C#. I haven't worked with C# much but I have found that learning about C# and C++ helps my understanding of OOP and Java.
I would also note here that C++ and C# are in wide use (look at the Boeing control software) so in answer to Mr. Saiful's last question C# is worthwhile for gaining employment.
Thank you Muhammad Saiful for this question and thank you David Carroll for this thought-provoking answer.
+ 11
David Carroll Thank you for your comment and the mention. Just to clarify, my audience (my distracted, frustrated audience) for "Java advocacy" consists of..15-18 year-olds. They agree with you that Java is verbose, has weird syntax, and in many ways distracts from the actual OOP problem-solving task. My job is to try to convince them to spend an academic year messing with it anyway:)
I will look at the video. Thank you and COWB🐮Y andSalif Mehmed for your contributions to this thread.
+ 9
The COWB🐮Y I think Google choose Java for Android because they didn't want to be in bed with Microsoft at such a core level. Pure and simple. 😁
I can only imagine Google had been frustrated that Java wasn't improving faster as a language and likely was excited to make Kotlin another first class language for Android.
I'm telling you... every ex-Java turned C# developer I've ever met was mad they didn't give C# a serious try earlier. Every C# developer I know who has worked on a Java project feels like they jumped back 2 decades and are like, WTF is this crap? 🤣😂
Java devs find this so hard to believe until they experience it themselves. I love it when I predict the outcome with new devs joining my team and a few months later they are shocked by the love they have for C#. They can never go back to Java... That is pure joy for me!
+ 8
There is no such thing that one language is better than other. Yes, I do agree that some language are faster and more efficient than other. But what I think is that this question is some how not answerable.
Look some languages are good for a particular thing and some are not.
Unity game engine could have import Java instead of C# but they didn't the reason is that they found C# to be more suitable for the development purpose and similarly android studio opt Java instead other languages (exception kotlin) for the development purpose. 🎅🎅🎅
+ 7
Salif Mehmed I think you forgot the why part of your answer.
I'm going to start deleting answers that say one language or the other without explanation. Otherwise, this thread will end up becoming a cess pool for spammy answers from people who have no insight on the reason for their answer.
Joe Awesome response by the way. I'd love to hear your feedback on that YouTube video as a Java advocate.
+ 7
David Carroll ex-Java --> C# dev. 😅😅😅
By the way, thanks for this information.😊😊😊
+ 3
Java
+ 2
Ex- Java --> C# dev. Thats means java lose it's track and productivity to keep dev.