I just started reading your book and am thoroughly enjoying it, thanks!
For the first HelloWorld.java example I have a simple suggestion: add a line like
Thread.sleep(1); right after
myThread.start();. This will pretty much ensure that “Hello from new thread” appears after “Hello from main thread” in the output, even if it is just a 1ms delay.
Adding that line also provides your reader for an opportunity for a simple experiment: commenting out the
sleep call will very likely reverse the ordering of the output.