I've been in the same position. Modern Java is a solid language. Most "enterprise" companies are still using Java 8 or if you're very lucky Java 12, so you really don't have access to all of the modern functionality and because of that I hated on Java for years. Java programming in the wild is a crap shoot at best.
You mean 11, right? 12 was not an LTS release, and has been out of support for years. The currently supported LTS releases are 8, 11, 17, and the recent 21 release.
Java has had some type inference for almost 20 years, and local variable type inference (i.e. `var person1 = newPerson();`) for more than five.