Since there is no "Thinking in Java 5," pirates have rebranded On Java 8 as the mythical 5th edition. This is copyright infringement, and while you might get the text, you lose the ecosystem (updates, code downloads, video lessons).
Let’s simulate what happens if you find a copy of the actual Thinking in Java 4th Edition (Java 5/6) and treat it as a 5th edition: Thinking In Java 5th Edition Pdf