Java solution to Dining Philosophers problem based on the Monitor object pattern.