You could write crappy code in any language. I don't think it's specific for Java. Overall I think java is pretty good, especially for big code bases.
And then there's a reason they're teaching the "functional core, imperative shell" pattern.
It’s certainly possible to write good code in Java but it does still lend itself to abuse by the kind of person that treated Design Patterns as a Bible.
I have a vague idea of what the Bible says, but I have my favorite parts that I sometimes get loud about. Specifically, please think really hard before making a Singleton, and then don't do it.