I can write java (and ~60 other languages for that matter), not only I can write java, I wrote parts of sun/oracle java (in c/c++) that are in use these days, and while java IS slow, or to be more precise VERY SLOW, it can still run circles around python. Python is on the other hand more "productive", an average "so called" programmer can output results much faster than similar quality developer with java.
It all depends on what you want to achieve, if you do ML stuff python will be more productive than anything else these days, if you want microservices, go ... if you want drivers, rust .. if you want telko erlang etc etc etc .. productivity these days is more important than speed as developers are expensive and hard to find while hardware is cheap
that's a major thing to understand ... "speed" is "complex" thing, do you mean execution speed or development speed? what you are developing? how many platforms? who's developing etc etc ..
python vs java, they are technically same sh1t, they compile into virtual machine code, difference is java bytecode runs in the java virtual machine and python bytecode in python virtual machine... and while java vm used to be #$^#&@ slow at the begining after many years and many hours pushed into it it got many times faster ... python is much newer so the python vm is not yet as optimized as it could probably be, hence java is executing faster... on the other hand, pythong is newer lang so more modern design, more modern libraries, more modern distribution of libraries etc etc .. if the syntax was not that stupid it would probably be even more popular ... but look at erlang, it is even slower with even worse syntax, but support for telko is soo god that 90% of the telko code is written in erlang .. so execution speed is lot less important compared to productivity
ah, and don't forget java had the silicone valey golden child sun microsystems backing it and then oracle, while python is backed by free time .. takes a lot of phd's to improve and speed up vm and a lot of $$$ to pay to use all those patents...
for pure execution speed attm java is way faster than python. not 100% sure but java is pretty much a champion when it comes to vm's, .not was second place but considering that m$ is pushing a lot of $$$ in the .not technology and that oracle is mostly keeping java alive while openjdk is not worth the mention unfortunately it's possible .not is already surpassed java wrt speed... python is nowhere near the leading two, last time I was looking at benchmarks it was slower than any of the popular ones, even php