DEV Community

Shah Hardik
Shah Hardik

Posted on • Updated on

Should I be learning Java in 2022?

Started my coding journey with java recently and a lot of people told me that the language is losing it's popularity should I continue learning it or shift to some other language?

Top comments (4)

Collapse
 
cicirello profile image
Vincent A. Cicirello

Java tends to be in the top 3 of most lists/surveys/studies of most used languages. The specific position varies. It has a rich ecosystem. Several other languages are designed to run on the JVM (e.g., Kotlin, Scala, Clojure, to name a few). Thus, other languages rely upon Java. Additionally, with interoperability with these newer JVM languages, Java's ecosystem is growing in interesting ways. Java is not going anywhere any time soon.

Now I'm not necessarily answering your question of whether you should be learning Java right now. I don't know anything about your goals and objectives to answer that. It depends. You tagged your post with both #java and #python. So I'm assuming you are also considering learning Python. If you want to get into ML or data science, then you might learn Python instead. This doesn't mean you can't use Java or some other language for ML. I extensively use Java for research in AI, ML, etc. However, there are a variety of really good Python libraries for doing ML and scientific computing. The reason I opt for Java instead is that Python is too slow for what I specifically do. If I went with Python for my work, I'd actually end up writing most of my code in C, but I prefer Java over C. The ML and scientific libraries available for Python are very good and fast because they are mostly in C or C++ compiled natively, but enabling you to use Python's cleaner more straightforward syntax. Thus, the Python interpreter's slowness doesn't really matter since most of the computationally intense stuff is native.

You also tagged your post with #webdev. I don't do much webdev. But, if you are interested in webdev, JS is probably what you want to start with.

Instead of starting by asking what language to learn, perhaps give yourself a project to develop. And then use that project to motivate language choice.

Collapse
 
shahardikk profile image
Shah Hardik • Edited

You cleared my misconceptions about Java.

Also, I tagged Python because I wanted the opinion of developers who use python. I am an Electronic student and want to make sure I am on the right path on my self learning journey into IT.

Thank you for the reply it was really valuable and gave me clarity.

Collapse
 
cicirello profile image
Vincent A. Cicirello

You're welcome

Collapse
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

Whatever you learn in Java will most likely carry over in some way to most other programming languages. Sooner or later you'll have to pick up a few more languages either way.