It really depends of many circumstances:
- what type of programming you want to do?
- Is there enough jobs and opportunities in the area that you want to work in Java.
It really doesn't matter the programming language you learn first it doesn't matter all that matters that you understand your core programming concepts and you understand how to execute how to write code in a clean way and these are concepts and techniques that are universal across all the languages.
So let's get back Java, Java is used mostly in legacy enterprise application development which are going to get into later on this article, and Android but even with android that might be fading too, so let's talk a little bit about the enterprise development enterprise just means very large corporations big companies, Java was new hot language back in the late 90s and huge number of these corporations adopted Java, now because the big companies got involved with Java and Java was designed by community where all this huge companies like Jess Sun and Microsoft, IBM and all these big other companies got in there and they sort of tried to design the language via consensus.
You may ask what does this have to do with Java in 2020, Java is now something relegated, don't get me wrong Java has been simplified to some extent it got super complex and then Java developers rebelled against the Java intelligentsia and then it was simplified, largely through the spring of framework, Rod Johnson he wrote a book that was very important and he was called smarter lighter faster Java or something like that it's been a long time. Anyway in that book he basically criticized mainstream enterprise Java development he said that this sucks and he came up with the basis of the Spring framework which today I believe it is the most the popular Java framework it's the light and nimble Java framework.
Yes Java is very viable but if you gonna a get a Java job you could be working for very large corporations huge corporations you could be working on projects that may last six months a year two years in big teams, which means you probably gonna a need a calm side degree to get Java jobs, you're not gonna use Java small app development or web applications for small medium-sized businesses PHP dominates that maybe a bit of Python or Ruby. Java also used for android development as well, again there is another language out there called Kotlin and Google just said ok good on that one we are gonna a use that it's basically Java's answer to Swift for iOS so you had Objective-C for iOS which is heavy old language, Apple realize this so they came up with Swift great small dynamic language kind of like Python, anyway now kotlin does the same thing for android development and Google is basically give the thumbs up to it, but what's the most scared in this story is that Google has released in late 2018 another UI kit another framework which called flutter, and this flutter framework is build on Dart programming language, so Java has another strong competitor which I think Java can't bet absolutely.
I imagine people who are doing Android development are going to move away from Java over to this new language (Kotlin) or to this new framework (Flutter) since both are easiest, faster, lighter, speed and ease of use always beats old legacy languages that said it's probably plenty of jobs with Java right now in Android development, nut here is the thing a lot of app development in general they're going going to web stack now versus native languages, or in cross platform framework Like Flutter because we don't need to rewrite the whole code base for another framework.
Everything is good, everything has it's purposes everything has it's point, it all depends on what you want to do and what your jobs prospects are in terms of your location don't forget that I mention it earlier, that I leave up to you to determine. but if you are a beginner who are looking to get into Mobile app development I recommend to learn Kotlin or the best is flutter.