Effective Java by Joshua Bloch is fantastic for covering up to Java 9. There have been incremental updates since then but this book will get you 95% of the way, and it is very well written.
not really good for learning Java though, more for intermediate Java programmers. A much better book for someone learning the language is Core Java by Horstmann, which starts from the beginning and goes into depth.