I get the feeling that the people who deride Java either have little experience with the language and ecosystem or had were the poor folks that had to maintain a legacy <1.4 Java app for years and have no experience with modern Java.
It has its quirks (what languages doesn't?) but it is a fantastic general purpose programming language.
https://functionwhatwhat.com/go%E2%80%99s-type-system-is-an-...
If I would like to teach something smart to software engineers I use OCaml, if I want to teach how simple things can achieve a lot I use Go. (They gonna end up programming in Java or Python anyways :)) )