It's funny although it's true. I'm not a programmer, but that's the profile of the Java developers that worked in my team. Sad, really...
If you are a person looking to get good salary by becoming programmer but you are not really interested in programming, Java is most likely to be your choice.
You will never advance, but that's fine. If you are bad enough you will just change company and get your salary from another.
There is so much pressure to find Java developers that companies frequently forgo any sane process to check whether the person is actually qualified to do the job. With tools available like CoderPad and the likes there should actually be no excuse to do this but I guess somebody high in HR would be very unhappy seing how few actual Java developers they are able to hire after applying it.
When you work as a manager for the company and you are presented with a new project you can't say you will not do it. In many companies this will mean you are expected to hire people and to get it out the door.
In most companies incentives are against "we will ACTUALLY only hire best people".
Games and IoT projects need backends as well, and it's not that unusual for those to be written in java.
Just let a couple of enterprise architects loose designing them.
There is always a rule to every exception. I am in startup that uses Java. We are creating medical device software that runs on Linux. We have a JavaFX application that connects to a PostgreSQL database on Docker. The application also uses an embedded Jetty server to expose a series of HTTP endpoints as well as a websocket. We use Jogl to work with OpenGL to render 2d graphics to the screen.
This is by far the coolest project I have worked on.
I went to Github’s trending page for a bunch of different languages and after looking at the projects there, I decided to fully invest myself into C++ instead because I felt like that’s where the most interesting projects were. Maybe a bad way to decide your career path idk
You should not base your career choice of being Java programmer or not solely on Java's popularity.
There are genuine good reasons to learn niche technologies especially if you like them more. I think if you genuinely like something you are much more likely to succeed in that field and it is better for you no matter the size of the field.
Choosing niche technology means you will have less options when changing jobs but, remember, you only need one good offer.
Here's my thought about Java:
Java development is for a specific type of programmer that will most likely work for large corporation and more often than not on some unsexy backend system.
Java is uniquely suited to be language of choice for the enterprise for many reasons which I will not go into right now.
These companies are currently extremely hungry for Java developers. This also means you will not only have no problem finding a job, you should be able to command good starting price compared to about anything else (except maybe React).
Java is becoming better work environment, not worse, with every passing year. It has excellent tooling (IntelliJ IDEA being in my mind best IDE in the world except for Emacs with Slime). Excellent frameworks and support libraries (Spring Framework + satellite frameworks). Excellent support and portability (if you can install Java in particular major version it WILL work). Excellent build systems (Gradle being my choice). And it is also quite efficient with resources if you do it correctly and don't make bad choices -- JVM is actually very fast and the only major drawback is startup speed and memory upkeep which are not an issue for typical enterprise service.
Major drawbacks:
It is not particularly good language in itself, but that's what I get for learning Lisp. It got a bit better recently (recently in this case is past few years).
It is suited to particular types of projects which tend to be unsexy, enterprise services. If you become Java developer you probably will not be working on games, on exciting IoT projects, beautiful UIs, AI, and other exotic stuff. You will be doing backend systems and hopefully be paid well.
Oh, and you will be working with a lot of people that barely can write a loop. That's that. I said it...