DEV Community

Ry
Ry

Posted on

Why do beginner hate Java so much

I'm getting to the point where I can start being considered an old guy. My primary language is Java. The more I engage with the community, the more I find dislike and frustration with Java. To me, it was my first serious language and I found it great as it told me everything I wanted to know about the new APIs and third-party libraries. It also didn't devastate my global environment by installing third-party libraries as would Node or Python. It's all a binary that you add to a classpath instead of installing it to the OS.

Working with JavaScript and Python I'm mostly frustrated by

  • magic string configurations
  • not knowing what is being passed into and returned by APIS
  • and not being able to trust third-party libraries

I'm curious

  • What frustrates you most about Java?
  • What frustrates you most about learning Java?
  • What is your perception about Java?

I'm really starting to think that it just needs an image overhaul on how you learn it and approach? I ask my self, would could I create to show its versatility and effectiveness as a backend language.

Top comments (13)

Collapse
 
vonheikemen profile image
Heiker

I've only used java once in my life and that was enough to develop an irrational hate. That was shortly after i learned C.

The most annoying thing was that the smallest unit was a class. When you just want to write little things it looks "noisy".

As a beginner i thought that you really really needed an IDE to write java, so the idea of a programming language that "made me" use an IDE was awful. Having a crappy laptop doesn't help either.

The last thing was the bad apples of the local community, they were too loud and too arrogant to even consider approaching.

Collapse
 
erikwhiting88 profile image
Erik

I second the "noisy" notion. I used to complain that it was so "chatty."

Collapse
 
ranewallin profile image
Rane Wallin

I like Java, but I think there are some challenges with it.

The most popular version of Java is v 8, but the current version is way past that. They are up to Java 13, with 11 being the current LTS release. A lot of institutions are still teaching Java 8, though. This becomes problematic if you decide to installed the current version, because your old code simply will not work.

A lot of things people are learning now are no longer in the current version, or are in it in a very different way (JavaFX for instance). It's different enough to make the transition difficult, especially when Java 8 is still the standard at so many places.

Also, Java just isn't great if you want to make nice GUIs unless you have very good interface design skills AND coding skills. Any .NET language with VS as the IDE will get you much nicer GUIs with far less effort. And, if you like Java you can use C# with is almost identical.

Another reason people don't like it is that Java is strictly typed, which can be annoying if you are used to a language like python or javascript.

The awesome thing about Java is that it is very much an object oriented language. For the most part, it does an excellent job of abstracting the what from the how. Those features, though, can be hard to learn in the beginning and may push people away.

Collapse
 
khmarbaise profile image
Karl Heinz Marbaise • Edited

If your code does not work on newer java version you are doing very strange things... I used code which was written with Java 5,6 and works without any issues on JDK11, 12, 13 etc.

Also, Java just isn't great if you want to make nice GUIs unless you have very good interface design skills AND coding skills. Any .NET language with VS as the IDE will get you much nicer GUIs with far less effort. And, if you like Java you can use C# with is almost identical.

If you have to do GUI's today you do WEB or you use JavaFX or other things like Vaadin. It's much powerful then you think. If you use C#, .NET you are limited to be running on Windows only..which is usually a bad thing...

Another reason people don't like it is that Java is strictly typed, which can be annoying if you are used to a language like python or javascript.

The strict type systems is in the end a safety net which helps a lot and prevent issues which you have to cover on top via Tests in Python, Javascript (Typescript?)...

Collapse
 
ranewallin profile image
Rane Wallin

This is simply not true. Java 9 introduced breaking changes.

theregister.com/2019/03/07/java_de....

Thread Thread
 
khmarbaise profile image
Karl Heinz Marbaise • Edited

What exactly you are referencing to? The module system? The module system is opt-in so if you use it then yes that would break more or less all apps, but no library etc. is using it so keep your java on classpath and it works as before ...

Update: In 2020/2021 some libraries have begun to use the module system...which takes time as expected...

Furthermore if you are referencing on the small changes which could cause breaking your code then I quote myself:

If your code does not work on newer java version you are doing very strange things... I used code which was written with Java 5,6 and works without any issues on JDK9,10,11, 12, 13 etc.

The majority of those changes have been deprecated for more than a decade ... and produce warnings during the builds (compiling) Ok if you ignore such things? Ok... then you have a problem...

I've migrated a lot of projects from JDK4,5,6,7 to JDK 8 and afterwards to JDK 11 and we had exactly 3 such cases using deprecated code of the JDK .... so where is the problem?...If would start to blame someone I would blame the original developers to use deprecated code or even worse not cleaned up the code after years...

Collapse
 
stamanker profile image
Maxim

Your old code will work on newer Java.

Collapse
 
laurieontech profile image
Laurie

I also learned on java, but there was a twitter chat about this that was enlightening. Building and running Java requires more know how than other languages. There is more to learn and do know. New learners are put off by how verbose it is (I consider that a feature) versus more “readable” languages.

Collapse
 
aetherus profile image
aetherus
  1. Checked exceptions, especially when combined with built-in functional interfaces.
  2. Type erasure, especially when combined with reflection.
  3. Primitive types, especially when combined with generics.
  4. The mixed use of all the things mentioned above is like hell.
Collapse
 
abdurrkhalid333 profile image
Abdur Rehman Khalid

Hey you are same like me, my main Programming Language is Java and I am also not able to understand why people hate Java and why not people building the applications of now a days using Java and I also do not understand why JavaScript despite of being unstable has taken most of the Heat.

I am a fresh graduate and I have completed my Final Year Project in the Java and Angular. I like Angular as it is quite similar to the Java and Doing object oriented programming in Angular is very easy.

I also have worked with Hibernate as well. So I love Java too.

Collapse
 
fer_120 profile image
Fernando García

Working mostly as web developer sometimes implementing ML and CV stuff I also haven't had the need for using java, all I need is nicely covered with Python and Node, I even used Golang with very good results.

Futhermore I don't have any desire to use Java, I had to learn some while at the University for tweaking some of Matlab's inner functions for a project and I hate it!

Collapse
 
victor_kenneth3 profile image
Victor.kenneth💡🌍

I feel like there was not enough friendly beginner material on Java back then when i started learning java, no amount of books introduce me to the language properly i don't know if i was too dumb enough to understand the language but i plan on going back to re-learn it.

Collapse
 
ebremer profile image
Erich Bremer

What frustrates you most about Java?
lack of support for longs as array indexes. Not in big demand for some, but I want it.

What frustrates you most about learning Java?
this would be difficult to answer honestly since I have been learning it since the beginning. Learning it from the beginning I don't think would be the same as learning it now in 2020 as it was starting with JDK 1.0. Historically speaking, the language itself was easy enough to learn (I knew C/C++, LISP, Prolog and other languages already). Many "issues" I had work worked out along the way as Java evolved like any language.

What is your perception about Java?
It's a good language. It's not vastly different from most languages containing all of the usual same constructs, variables, loops, conditionals, etc.
Much of the value of any language is in it's community and available supported libraries. Having access to a myriad of databases, image libraries, and so forth is available in Java. Some languages, while cool, may not have libraries to do complex things forcing you to invest and write those libraries yourself. With Java, I can download matrix multiplication libraries that will take advantage of multiple cores. This isn't to say that other languages have their own library support. Python has much. Javascript getting better.
All languages evolve. Java has had it's issues, many resolved, some not, but so do they all.

Exciting new things in Java? See: graalvm.org/