Python, (not to be confused with the snake), is a fairly new coding language, that excels in many areas. Python is mainly used for Web Development, Machine Learning, Data Science, and much more. Many companies such as Tesla and Dropbox use python for software development. Tesla has built almost all of the algorithms for FSD (Full Self Driving) using Python Machine Learning. Why should you learn this language? Well, if you always wanted to learn Machine Learning or Data Analytics, then Python is the way to go. Web Development, while it may not be the best suited when it comes to Python, it is definitely feasible using frameworks such as Flask 2.0 and Django.
Java has been widely used for software development by many major organizations already. Java is used mainly for back end development jobs that contain mass amounts of data. It is also commonly used for Android Development, Mobile Computing, & Game Design. So why would you want to learn Java, well beside the points made above already, it is also quite fast and needs minimal computing power, which can be helpful in many cases, especially in mobile computing (mobile based games).