r/learnjava • u/capm_diealone • Dec 29 '23
I don’t like Java. Change my mind.
Hi all! I don’t mean for this to be a shitpost or anything like that, truly. Lately, for some reason, posts from this sub have been entering my email. I’m primarily a C# dev, and I love Typescript as well. I’ve always hated Java. Don’t ask me why…I don’t know. When I was in school, I was more or less taught that Java is super slow because the JVM is bad.
I’d love to know what’s been up with Java, partly because a lot of banks seem to use it and partly because I don’t wanna be that guy that just discounts a whole language because of flaws it had over a decade ago.
So change my mind! I’d love to find out what’s been up with Java, and any resources y’all can provide for learning Java (bear in mind I’m a very experienced software engineer) that aren’t LinkedIn Learning (I get access through my local library but that access is down right now) would be super appreciated.
Again, this is not a shitpost. I just hate Java. Change my mind!
3
u/Stack_Canary Dec 29 '23
https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/csharp.html
This compares different languages based on execution speed, binary size, memory usage etc. Seems C# has the general edge still, but for some type of algorithms java is faster.
Though, note that it's tricky to say language X is faster than language Y, as it depends on implementation and use cases. Even though C# may be faster in solving a fannkuch-redux problem, it doesn't mean that an API made in C# is faster than an API made in Java when you take into consideration DB operations, architecture, deployment and startup-times, architecture etc. Java has become very modernized in the last 10 years, and you see performance improvements for nearly every new version. The "myth" that java is slow comes from ancient versions of java way before version 8 and simply is not the case anymore.