Simple example of Java wait/notify API for multithreaded code.