Java is a famous object-oriented language other than Python and R (which is a procedural language) that is being used by data scientists extensively. All these three languages are used by data scientists, so investing in any of these three languages is good, as all these are getting linked to machine learning applications, so you have the future prospects secured. The reason why Java is being been used is because of the several benefits it offers; Java is both fast as well as exceptionally scalable and being an object-oriented language requires fewer lines of code to get the job done.
If you wish to learn Data Science and become a certified professional, I would recommend you to enroll in Data Science training or Java certification course from Intellipaat, which helps you bridge the gap in skillsets to become successful in the domain along with certification. Also, take a look at our YouTube video on Top Programming Languages for Data Science.