While Android/Kotlin keeps Java in the spotlight, Java also powers financial services, high--frequency trading systems, payment gateways, logistics platforms, and even modern microservice deployments. These are not all “legacy”,they’re mission-critical platforms handling billions of transactions daily.
The exact same argument could be said for COBOL and Fortran.
>high--frequency trading systems
Probably not the Java stack itself, given GC latency and precision timing skew would translate into millions of lost dollars a second. However, people do silly things in the wrong languages all the time. =3
It looks like you're not up-to-date, ZGC has pauses on the microsecond dimension.
Even since before ZGC was added, there are open source libs for HFT that optimize allocations to avoid GC: https://github.com/openhft =3
FWIW, I've seen job ads for Java developers in HFT.
It did look weird, of course, but they're also using Go (which iiuc has worse GC latency) or other garbage-collected languages (OCaml being a famous example).