When I ran the program I dont see any output. It just happened (on my machine) that the notify method was called before the wait method was called. I modified the code.
The output is after notify going to wait
Sunglasses. AKA Coolness prosthetic. This tiny ad doesn't need shades: