r/learnjava • u/kres0345 • Jun 21 '21
Why learn Java when there's C#?
I am genuinely curious, as it seems C# has superseded Java in many regards. The only reason I can think of using Java is backward compatibility.
EDIT: To clarify, the main selling point of Java was cross-platform, but nowadays most frameworks and toolsets are to some degree cross-platform, including .NET Core, which is the new main framework of C#.
0
Upvotes
11
u/[deleted] Jun 21 '21
C# as a language had some nice features- but it also huge; seems they allowed every feature under the sun on it.
Java can do pretty much everything C# can, but the amount of sugar varies.
C# on Linux wasn’t a serious proposition for a number of years.
Java has a nice ecosystem, good tools and excellent libraries. It can be used for very fast stuff (if you’re careful).
My last couple of jobs used a C# gui and a Java backend, even with .net core we weren’t particularly interested in rewriting in C#.
Personally they are both fine languages. Java rusted a little but they are trying to catch up now.