Because I’m in my very early 20s I missed out on the huge Java craze. Everything was Python when I started getting a more formal education and before then all my work was in C++. Knowing more languages would obviously look better on a CV but I mean if I would benefit in a practical sense? I have two friends who are long time Java devs. And recently another friend who generally works with legacy C++ based systems from the early 2000s late 90s period had to work on a bunch of stuff in Java. Java is clearly still in large scale use among older systems. So would it be likely that eventually I would need to work on Java systems myself when my job is mostly JavaScript currently?
In my personal opinion you should try to be a beginner or intermediate in all languages you think you’ll need to work on. It makes you more valuable as a teammate and helps people view you as someone who can pitch in with anything. So if you think you’ll need to use Java at your current job then I’d learn some!
You say you’re familiar with Python, I say I’m intermediate with it, so like I only recently learned Python has multiple returns and tuples separately from each other. To me that’s intermediate. Like, I can read python code and be pretty sure I understand what it does but I’ll probably be a lot slower especially with niche features and frameworks.
If you do get into Java you’ll want to look into Spring Boot. It is the de facto framework of Java the same way Rails is the de facto for Ruby.
you should try to be a beginner or intermediate in all languages you think you’ll need to work on
This is good advice. Don’t be too much of a generalist to the point you know a lot of stuff badly, but also don’t corner into a technology and make it your identity.
Learn mainly the strengths and weaknesses of each language and tech you use, so you’ll know when you should pick something different for a specific project.