Or just focus on his words and use the snippets like generic code and figure out how to do it in whatever language of choice.
You don't need to "learn java" to become conversant or read it as pseudocode.
I guess if you're extremely early in your career and have never written anything but Python, it might not be, but if you've ever touched any statically-typed language and a language with a somewhat C-like syntax, you should be fine.
I did the first half in Clojure (in order to teach myself Clojure), worked just fine. I had to do a bit of translation but it's really not a lot.
I did the Torsten Ball books in Kotlin rather than Go and learned a lot
Then just write it in whatever language you want. When I went through the first half of the book back in 2017, I wrote it in Scala. (I did know Java, too, though, so certainly I had an easier time understanding the code examples in the book.)
I know JavaScript and a bit of C and I'm not having much trouble understanding the Java code.
switch (thing) {
case Integer i when i > 0 -> println(“Positive…”);
case …
}