Java is not just "language" its Framework that include lots of ready for use functional.
But it was "cool" like 10-20 years ago, now most of Java features exist even in C++20
java still good framework, but now we have options to look on other frameworks that even simpler to use than Java.