Actually, it is up-to-date (new features twice a year, some of them, e.g. virtual threads, are truly SotA) and not legacy (things like graalvm and helidon 4 are relatively new and are awesome). Do not avoid Java if your project would benefit from it.