Java is fully featured and provide security with Spring and if you know that mostly banking services using Java. As you know that android also use Java as a back-end then we can say this language will always be there. Java is only one which provides all features like we can make Desktop Applications, Web Applications, Android Applications and so many things.
Java is only strong today because it was so strongly pushed by colleges for so many years as the Microsoft alternative. However, there are more and more preferred contenders to choose from today.
While Java will continue to employ people for a while to come, it will be despite it's many shortcomings compared to languages like C# and Kotlin. Legacy code has a tendency to stick around for a long time, sort of like cockroaches. 🤔😜
I do suspect that a decline will begin to be reflected in the coming years as Microsoft has made the push towards multiplatform and open source with .NET Core and with Google showing a long term commitment to back Kotlin over Java.
I suspect that a majority of data reflected in the TIOBE search trends are generated from university students. Most college curriculums seem to be a good decade or so behind modern professional software engineering practices. This is the reason I don't rely on the TIOBE Index other than for amusement.
LinkedIn is another community for professionals, believe it or not but you have atleast 20 to 30 job postings almost every week for java dsvelopers.
Just like ~ swim ~ mentioned it is heavily used in enterprise development.
Recently I attended TCS exam which is india's largest IT company ,and every question there was in c language and as you said now there is kotlin for android development, so what's the advantage of learning java in