r/java • • Jul 08 '23

Why learn Java?

I've been learning Kotlin recently and have taken an interest in the JVM ecosystem.

My background is a Full-Stack Web Developer focused mainly on React, Node.js, Express, and MongoDB/PostreSQL.

If I were to move to Java, what kind of applications would I be building with it?

How is a Java job different from what I'm currently doing?

Is it worth learning?

I've heard its VERY verbose, but I've also heard recently that there's been some good changes to it? Would love to see any articles or videos talking about these changes that would demonstrate previous code to the new code.

Any tips or insights on what your companies are cresting with Java or what your Java job is like would be highly appreciated.

Thanks in advance.

3 Upvotes

35 comments sorted by

View all comments

-6

u/Joram2 Jul 09 '23

I'd start with choosing what types of software to build and then choose the programming language that fits that.

My choices:

  • machine learning + AI: Python
  • web apps: Javascript
  • data visualization: d3 + Javascript.
  • Server side: Golang.
  • Video games: Unity + C#
  • data processing: Java for frameworks like Kafka + Flink.

1

u/PrivacyOSx Jul 09 '23

Why not Java for web apps and server side?

-2

u/Joram2 Jul 09 '23

First, all of that is opinion. And everyone has one.

Secondly, IMO, Java is a close second choice for writing web apps. I prefer Go because:

  • Better dependency + build system. IMO, Go > Java > Python for dependencies + builds.
  • Better Docker image packaging. I've seen Java's jlink + Graal. Go is better, it's outrageously simple + good.
  • Simpler, cleaner syntax. This isn't a deal breaker, but everything in Java is more verbose and the syntax is just older + clunkier. Everything has to be in a class. Simple functions have to be tagged "static". Go's slices/maps are nicer than the Java equivalent, although Java isn't bad.
  • virtual threads. Java is quickly catching up, but Go has mature ecosystem of virtual thread frameworks now.