I have been learning Java through the Java MOOC and I find the workbook-style approach of learning very effective for me. Basically, I’m looking for resources, offline or online that have plenty of exercises.
Preferably, they should clearly define the tools that I’m allowed to use (because there are many ways to code for a problem), and have some ability to give feedback, for example if it’s a physical book it should provide some input and output tests for self-checking.
It’s not exactly the same, but having taught sixteen folks from complete beginner to full-time engineer, I find there’s a point where it’s most effective to transition to self-directed exercises with test-driven development. If you’ve gotten familiar with the fundamentals you might check these out.
This method of learning with TDD has you build the workbook yourself with tests first, then you change gears to write the code to satisfy them. While not as fast in terms of features per hour, it’s a much higher level of engagement and so provides much more value per hour.
There are hundreds of YouTube videos on TDD in Java. I would just follow along with a few of that until you get comfortable with the technique. After that there’s dozens of exercises on sites like this one https://codingdojo.org/practices/KataCatalogue/
That being said, some of my best students only ever did the Poker Hands kata over and over again. They’d start on an empty repo each time, and each time solve it some new way. After about a dozen successful attempts they’d have seen so have different ways to solve the same problem that they’ve developed an intuition of when to use each technique.
This is also now how I learn new languages. I’ll skim some docs, watch a YouTube on getting tests setup, and then do the poker kata a few times in it. After the fifth or sixth pass I’m already feeling extremely comfortable in the language and can start a more rigorous study of tools like libraries to solve a specific purpose. This is how I’m able to get very comfortable in most languages in a few days (unless it’s an extremely different language like Rust, Lisps, and Haskell those took me much longer to get comfortable).


