a simple java app that uses synchronized threads